I'm new to Arduino so it took me a while to get this working. I am using a Mac with OS X 10.6.8. The first problem was that this sensor has 4 pins instead of the usual 3. For 3-pin models, the input and output use the same pin. Luckily the contacts are labeled so it was easy to figure out. Connect GND to ground and Vcc to the Arduino's 5V supply. Trg must be a digital output. I used pin 11. The echo should be an analog input. I used A0. The hardest part was figuring out where to put the library files I downloaded from the virtuabotix website. I never store files in my documents folder. In [user]/Documents/Arduino I had to create a new folder called _libraries_ and put the _Ulrasonic_ folder I downloaded from virtuabotix inside this newly created _libraries_ folder (you need to decompress it first if you disable auto decompression to have). After exiting the Arduino and restarting, the library was recognized. Finally, Serial Monitor took a while to open due to a misleading forum post. You can find the Serial Monitor in the _Tools_ menu in the Arduino app or use SHIFT-COMMAND-M. It is NOT on the icon in the sketch window. **CORRECTLY. THE SKETCH WINDOW HAS A SERIAL MONITOR ICON. THIS IS IN THE UPPER LEFT OF THE WINDOW - LIKE MAGNETIC GLASS. Now it works great. I took some code from the example file and mixed it with my code and I can detect objects within X inches of the detector. The *Defend-Porch-Peeing-Cat* mission is in full swing. CONTINUED: I installed the sensors with hot glue and they don't work very well. The problem could be the length of the cable I'm using between the Arduino and the sensors (about 2 meters) or a bad pin connection (making 4-pin 0.1" Molex sockets wasn't easy _insert curse here_) . I've hot glued or wetted the sensors, ordered two more distance sensors and will test them on my connectors to see if the hot glue or connector/wiring causes any problems.
Enhance Your Experience with Cambridge Vibration Rubber: Dampening Vibrations Effectively
3 Review
🚗 Enhance Vehicle Performance with Gabriel 83038 FleetLine Shock Absorber
3 Review
Hinge Hettich Sensys 8639i with mounting plates and end caps, 2 pcs., hinge type: inset, nickel
6 Review
Efficient Solutions with CTA Tools A430 Absorber Socket: Enhance Precision and Ease in Absorber Removal
3 Review