Connect the Buzzer positive terminal to the Arduino pin 2 and the negative terminal to the Gnd. Connect the VCC pin of ultrasonic to +5v pin and the Gnd to the ground. Connect trig pin to pin 10 and echo pin to pin 9.
Connect the Buzzer positive terminal to the Arduino pin 2 and the negative terminal to the Gnd. Connect the VCC pin of ultrasonic to +5v pin and the Gnd to the ground. Connect trig pin to pin 10 and echo pin to pin 9.