Hi,
has anyone tried / successfully got this sensor working with a BeagleBone?
http://www.parallax.com/tabid/768/productid/92/default.aspx
I previously had this working fine with an Arduino, but now wished to move it over to my BeagleBone. For the sensor to start working it needs to have the pin set HIGH for a couple of milliseconds and then you can start to read the analog values returned.
This sensor uses the same single wire to send the signal HIGH as is does to read the values. I’m assuming that the send signal is digital and the read signal is analog.
I have a piece of breadboard and am connecting pin 15 (gpio 48) and pin 40 (ain2) together and a single wire out to the signal line of the PING))).
From the command line, I export gpio 48, set the direction and then echo 1 > value so that it switches the PING))) on - this looks good as the LED turns on.
If I now go to /sys/devices/platform/omap/tsc and cat ain2, I see 4095 output I recognise this as the default / I’m not doing anything value. If I then disconnect the gpio48 wire, so it is no longer connected to the ain2 wire and I repeat the cat ain2 repeatedly, I get values output that cvary.
If I hold my hand close to the sensor, I get values like 1,7,14,0,1,17,3 - but they seem to jump about quite a bit - if I just leave the sensor pointing at the ceiling I get values like 1,6,3,4,27,20,25,1,0,9,19,4,2 - these seem all very random.
Has anyone connected the PING))) to a BeagleBone before and gotten it to work properly? If so, can you give me some pointers as I’d very much like to hook up a couple of these sensors.
many thanks
Tony