Im doing a project which is creating a self driving car and im needing help with the coding of the Ultrasonic Sensor. Basically im using the sensor as an input to a servo motor. Im needing a "when the sensor detects something the servo will turn on".
Just some guidance would be a big help
Im using an Arduino Uno Board.