How to "interface with all but the SRF06 sensor using only one Arduino pin."
The playground.arduino.cc site has your library listed with an option to use a single Arduino pin. However, the constructor seems to take two pins.
http://playground.arduino.cc/Code/NewPing#Constructor
Thanks for your help!
Comments (6)
-
-
repo owner That's just a secondary information location. BitBucket is the only distribution site. Also, I don't follow you on what is incorrect. When using one pin, you specify the same pin for both the trigger and the echo. I see nothing wrong with the information on the Arduino.cc site.
-
repo owner -
The disconnect for me was in the release note saying that you could use a single pin but the constructor requiring two pin arguments. I think a simple note that the two values should be the same pin, or a new constructor that takes only one pin but uses it for both trigger and echo would help clear it up. Obviously once I found the wiki and the sample sketch here that solved it for me.
Thanks
-
repo owner Got it. I'll look into a way of clarifying this. Thanks.
-
repo owner - changed status to resolved
Added comment about using a single pin with the constructor. Also broke out the constructor and the methods into two sections for clarity.
- Log in to comment
Actually, now that I look at bitbucket, it's just the arduino site thats out of date. The example is available here: https://bitbucket.org/teckel12/arduino-new-ping/wiki/Home#!single-pin-sketch