Let's Make Robots!

SRF02

Problem with Ultrasound Sensor

Hello LMR.

I am working on a current project but seem to be having a ridiculous amount of difficulty implementing an SRF02 Ultrasound sensor. I am using it in serial mode and communicating with an Arduino Duemilanove. The problem is not in the wiring as I triple checked that.

The adruino is supposed to send 2 bytes to the SRF02 [ address, command ] and then receive 2 bytes in response giving the distance measured by the sensor.

Hi guys! Goggling around searching for information on arduinos and robots, I found this fantastic website. After spending hours reading your projects I decided to … Read more

SRF02 and 16f877a in I2C mode ranging

Hi,

I am trying to test SRF02 ultrasonic rangers I just bought and to do that I connected them as required, and wrote a program in MIKROC for I2C transmission. My problem is that everytime I power up the curcuit my PIC burns. I connected pull up resistors to each of SDA and SCL lines; could it be that these resistors impose too much current into SCL and SDA pins of the PIC? Maybe I have to use a buffer between bus and 5V? The code is below. I am new to embedded programming so any of your comments would be of much use to me.

Thank you,

Denis 

The Code:

HaBot photo

Habot v1.1

Function work now, trying to do funny thing.

1. tank can go forward, backward, turn right and left.

2. Detect the object distance

3. stepper motor can turn to absolute angle.

4. detect distance on every angle of stepper motor and find the shortest distance of every angle.