Devantech SRF04 Ultrasonic Range Finder

please i want to ask 2 questions

1- all the connections between the sensor and the micro controller u mentioned is about the Basic Stamp2 (Does the Basic Stamp 2 is similar to the Basic Atom Pro 28 )? {as we bought the basic atom pro 28 }.

2- The example program of the sensor is written by the Pbasic programming language
could i use C++ for programming it
if so, could u send me the program by the c++ programming language!!!

thanks in advance

Here is some help. Sorry I don’t know anything about C++.

viewtopic.php?t=570

viewtopic.php?p=50420#50420

As for C++, the Atom Pros do support the GNU set of languages, which are downloaded as part of the IDE. So yes you can use C or C++.

This includes all of the standard C libraries. However as far as I know, none has produced a C/C++ support library to do hardware specific things like, timer functions, or servo functions, or easy support functions for input from devices. With the Atom Pro you can either work in Basic with if necessary inline assembly language code, or you can work in C/C++ or in totally in assembly language. IE when you create a C/C++ or Assembly language project, none of the functionality that is built into the Atom Pro basic is made available to you.

Awhile ago I played with this and I had a simple hello World program running, which included a timer and I believe I may have had the PS2 remote control working, but that is as far as I took it…

Good Luck
Kurt