thearn/Python-Arduino-Command-API

How to wire sonar

sdmeijer opened this issue · 2 comments

I have a HC-SR04.
How should I wire it, so that I can use pulseIn or pulseIn_set?

Should it be like this (http://hackage.haskell.org/packages/archive/hArduino/latest/doc/html/System-Hardware-Arduino-SamplePrograms-Distance.html)?
If so; it doesn't work with your example. Can you help me out?

The ultrasonic rangefinder that I've used is the same in this demo:

http://arduino.cc/en/Tutorial/Ping?from=Tutorial.UltrasoundSensor

which seems similar to the one which you posted, but not identical. I'll see what I can find about it.
Have you used any pure Arduino sketches that have worked with it?

Got it working with: pulseIn_set(pin, "HIGH")