Project

General

Profile

Sonar Information

The Sonar we're using (SRF02) uses the I2C bus. Be careful of two things:

1. We couldn't get the functions in I2C.h to work properly, so we used Arduino's Wire library. We may want to fix this in the future, but it works fine for now.

2. The hardware address of the sensor is 0xE0, but Wire only likes 7-bit addresses, so it actually becomes 0x70. You could do 0xE0&(0x7F) for clarity, but it's easier just to set the address to 0x70 in the code and remember why. (and that's not particularly clear anyways)

Some Data:

1. We tested the sonar to be very accurate (consistently one inch smaller than the actual value) between 7 and 200 inches if the surface is perpendicular to the sensor, and between 7 and ~100 if it's not. It will occasionally read correct values above 200 inches, but usually will be unable to get a reading.