Hi,
Does anybody know how to connect and programme·a SRF01 instead of the included IR to my Boebot??
My intension is to have one SRF01 in each corner (front) and avoid objects.
There's nothing special about connecting an SRF01 to a BoeBot. You just need to supply power (+5V and ground) and a control signal (I/O pin).
The HIGH / LOW / INPUT and SERIN / SEROUT statements are all that are needed for controlling it. Unfortunately, the manufacturer doesn't have any Stamp examples of its use. Familiarize yourself with the chapters in the Stamp Manual on these statements.
Something like this would send a command to the SRF01. You'd follow this with a SERIN to wait for and read a response from the SRF01:
The Robotics with the Boe-Bot text does not cover those commands. However, you can download the BASIC Stamp Syntax and Reference Manual for more information on using these commands. Each page contains a full description as well as example code for applications.
Hope this helps.
Jessica
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jessica Uelmen
Education Department
Parallax, Inc.
Post Edited (Jessica Uelmen (Parallax)) : 5/22/2009 3:45:35 PM GMT
You don't have to have a resistor between the SRF01 and the I/O pin, but a 220 Ohm resistor there would prevent damage if the SRF01 were trying to transmit to the Stamp while the Stamp was transmitting to the SRF01.
The 84 is a constant that specifies the serial I/O Baud and the format of the serial information (true logic, 8 data bits, no parity bit). The Stamp Manual chapter on the SEROUT statement goes into detail on this.
You have to read the SRF01 documentation. It explains what is sent back and forth between the Stamp and SRF01.
Comments
There's nothing special about connecting an SRF01 to a BoeBot. You just need to supply power (+5V and ground) and a control signal (I/O pin).
The HIGH / LOW / INPUT and SERIN / SEROUT statements are all that are needed for controlling it. Unfortunately, the manufacturer doesn't have any Stamp examples of its use. Familiarize yourself with the chapters in the Stamp Manual on these statements.
Something like this would send a command to the SRF01. You'd follow this with a SERIN to wait for and read a response from the SRF01:
LOW pin ' Send a 2ms "break"
PAUSE 2
SEROUT pin,84,[noparse][[/noparse]command]
Do I need a resistor between the sensor and the I/O?
Will SERIN be a value (in this case in cm because of "84") or will it be·a signal when you have reached a specific distance (like an IR sensor)???
/Ola
The Robotics with the Boe-Bot text does not cover those commands. However, you can download the BASIC Stamp Syntax and Reference Manual for more information on using these commands. Each page contains a full description as well as example code for applications.
Hope this helps.
Jessica
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jessica Uelmen
Education Department
Parallax, Inc.
Post Edited (Jessica Uelmen (Parallax)) : 5/22/2009 3:45:35 PM GMT
The 84 is a constant that specifies the serial I/O Baud and the format of the serial information (true logic, 8 data bits, no parity bit). The Stamp Manual chapter on the SEROUT statement goes into detail on this.
You have to read the SRF01 documentation. It explains what is sent back and forth between the Stamp and SRF01.
I am sure·I will·find a solution thanks to your guidance and help.
Best regards,
Ola