How to wire sonar
sdmeijer opened this issue · 2 comments
sdmeijer commented
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?
thearn commented
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?
sdmeijer commented
Got it working with: pulseIn_set(pin, "HIGH")