PING))) likes to return 15cm [still unresolved]
I have a PING))) hooked up to a propeller through a 2 k ohm resistor and +5V and am using the Ping object. When I print the output, I seem to get '15' when I use centimeters() about 80% of the time, with the correct distance for the other 20%. The same is true for inches(), it returns '5' most of the time (5 inch ~= 15cm with truncation). What could be wrong?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm new to the propeller!
Post Edited (bulkhead) : 11/5/2007 9:47:58 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm new to the propeller!
Post Edited (bulkhead) : 11/5/2007 9:47:58 AM GMT
Comments
On another note, I hear this clicking noise each time it takes a measurement, is this normal?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm new to the propeller!
Don't forget that the Ping)) has a rather wide acceptance angle. This means it will return an echo from the first object it sees, whether it's directly in the "line of fire" or off center. If the unit isn't mounted high enough, or if the floor surface is rough, you many be getting an echo from that.
-Phil
2) How about posting your program? There's more to it than just the PING object ... lots of code to find an error in.
This is the gist of my code, since my actual program is quite large:
I am using the "Ping" object without any modifications.
On another note, I have also been having trouble getting the H48C tri axis accelerometer to work properly (it works partially, see this thread http://forums.parallax.com/showthread.php?p=684827). My setup is essentially the PEK breadboard with the accelerometer, ultrasonic, 1 servo, 2 h-bridges, a playstation controller and a serial port connection. I get these problems even with the h-bridges and servo disconnected (rules out electrical noise from motors). Perhaps the accelerometer and ping))) problems are somehow related. They both work partially but not completely..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm new to the propeller!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm new to the propeller!
Harrison
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm new to the propeller!