Go Down

Topic: Ultrasonic Rangefinder (SRF05) Expected Results? (Read 6872 times) previous topic - next topic



by looking at this code, I assume that this is a generic ultrasound code, and using this means you must have your SRF05 connected in "SRF04 Compatibility mode" that uses separate pins for pulse and echo.

The Code I have uses one pin for pulse and echo.

Did you try to use the SRF05 Code with a single pin, but at the same time you had your SRF05 physically connected as "SRF04 Compatibility mode" ?

I will also connect the sensor in SRF04 Mode and try this code.

by the way, by telling you about cables and connections, I also meant the connections of your sensor.
If the USB cable was not good, it wouldn't work at all..Try to install your Linux drivers once again, since Linux has known problems with USB-based controllers and devices.




by using this code, I get same problem like you...

but, I used the old again, I replaced delayMicroseconds with delay(), I
used a variable to store the ultrasoundduration/29 ( I got this from an
example with Basic Stamp2), and I get accurate results.

I don't know...I have a Maxbotix Sonar too, and everything runs simpler...just an analog value and there you are.. ;D



Where did you use delay() instead of delayMicroseconds()? In the original code that you provided, or one of the ones I've put up since?

As for connections, I've disconnected and reconnected the components several time, and looked at the wiring diagram for the SRF05 every time I've reconnected, so I think I've got it right.

Will have another tinker now and report back if anything interesting happens.


Go Up