Go Down

Topic: Arduino robot platform and HR-SC04 ultrasonic sensor (Read 2743 times) previous topic - next topic

freeland

Hi

I am new to electronics and ardiuno. Please help me. Does anyone has succeeded connecting HR-SC04 ultrasonis sensor to arduino robot platform? I see this sensor has 4 ping two for Vcc and GND. Other two for trigger and echo signals. And arduuino robot analog inoput has only three pins (Vcc, GND and analog input). Is it possible to combine these two pins in one and use with robot's control board analog input port (TK0...TK7) to control sensors behaviour. I need eight sensors for my robotic application placed around robot base  in perimeter.

Thanks for help

johnwasser

The HR-SC05 is not an analog sensor.  You trigger it with the Trigger pin and use pulseIn() to measure the pulse length on the Echo pin.  This uses two DIGITAL pins (one output and one input) but no analog input pins.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

StanD

Yes, you can connect the "echo" and "trigger" from the sensor to the same Arduino digital pin. There is a very good library that can make things simpler for you and will handle that scenario well: http://playground.arduino.cc/Code/NewPing
Arduino experiments, resources and hacks http://42bots.com

Go Up