You'll have to decide on what combination of distance sensor + microcontroller you want to use. I've tried them all, and found the following configurations to work well.
Of all the sensors that I tried, the Parallax Ping))) was the easiest to use with Trinket. All you need is GND, VCC, and 1-pin for measurement.
Snap the sonar into the mount.
The servos wires end in female connectors, which you will need to convert to male.
You can do this two ways, replace them with male ones
Or pull out the female connectors...
Extract a few pins from standard headers.
Insert the pin into the female receptacle.
And solder in-place.
Here is the circuit diagram to get all the wires in the right place. With the servos, remember that ground is often brown / signal is orange.
This guide was first published on Jan 02, 2014. It was last
updated on Jan 02, 2014.
This page (Electronics) was last updated on Aug 15, 2018.