Inconsistent readings with devantech SRF04 ultrasonic rangefinder
Whelzorn
Posts: 256
I am using a devantech SRF04 ultrasonic rangefinderwith a BS2 and using the source code found on the products page ( http://www.parallax.com/detail.asp?product_id=28015 ) and am getting very inconsistent readings. I will aim the sensor at my wall, and first get 34.4, which is correct, but when the next cycle is performed, the reading is 59.6, and it will go back to 34.4 on the next reading then to 29.3 (these are inches BTW). Anyway, I was wondering if anyone else has had the same problem, or knows what I can try to fix it.
Thanks,
Justin
Thanks,
Justin
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
USB-powered Stamp Board
http://hometown.aol.com/newzed/index.html
·
Post Edited (cabojoe) : 8/13/2004 3:26:32 AM GMT
Thanks,
- Gwyan
I prefer the SRF-08 I2C version. It takes a bit more code, but still just uses two pins that can be shared with other I2C devices (including more SRF-08 sensors).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Following a lead on a European microcontroller formum that said that "not all I/O channels are created equal" on the BS2, I tried a variety of pins. 0 and 1 didn't work, 3 and 4 didn't work but 15 and 16 did work, as did 13 and 14. I haven't had time to do a systematic test but I did confirm that pins 0 to 4 can still turn an LED on and off and get readings from a digital thermometer, so the pins are OK for most stuff, they just can't talk to the SRF04 in the right way.
I also am interested in the SRF08, though Erik Wood at Parallax said they weren't planning on carrying it.
Thanks
- Gwyan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office