Hey guys I am new to robotics and programming and I can really use some help. I just recently bought a 3 pin ultrasonic sensor from radioshack and I have an Arduino. I hooked up the three pins on the sensor to the Arduino and followed the directions for downloading the proper code. When I upload the code and check the serial port to view the functionality of my sensor all it reads is 0inch, 0cm for any object i place in front of it. I don’t know what the cause for this is. I can really use someones advice.
-Thank you
Johhny405
We would need to know more about your setup. What are the three pins on the sensor, and which pins do you have them connected to on the Arduino?
What sample code are you using?
Hey, a lot of semi-conductors have a similar 3 pin interface. One of them should be VCC (power, typically 5V), one should be ground, and the final one would be your signal.
Ensure that your VCC Pin is connected to 5V power somehow, GND to the GND pin of your micro-controller, and the last pin should be connected to a general purpose I/O pin. If all of this is done, it should start working.