How to Build the Watch:
To begin building the watch, wire the ultrasonic sensor and the buzzer to the Arduino UNO according to the given schematic:

Finally, build a case for the electronics and attach it to the watch.



Code:
Declare that the Trigger pin is connected to pin number 13, Echo pin is connected to pin number 12 and buzzer is connected to pin number 9
int trigger_pin = 13;
int echo_pin = 12;
int buzzer_pin = 9;
In the Void Setup, begin the serial monitor and set up Trigger pin as output, echo pin as input and buzzer as output.
void setup () {
Serial.begin (9600);
pinMode (trigger_pin, OUTPUT);
pinMode (echo_pin, INPUT);
pinMode (buzzer_pin, OUTPUT);
}
Write a pulse to the HC-SR04's Trigger Pin:
digitalWrite (trigger_pin, HIGH);
delayMicroseconds (10);
digitalWrite (trigger_pin, LOW);
Measure the response from the HC-SR04 Echo Pin and determine distance.
time = pulseIn (echo_pin, HIGH);
distance = (time * 0.034) / 2;
If the object is lesser than 70 cm, print "object is near", ''Distance= " and the distance between the object and ultrasonic sensor in the serial monitor and set the buzzer to high.
if (distance <= 70)
{
Serial.println (" object is near ");
Serial.print (" Distance= ");
Serial.println (distance);
digitalWrite (buzzer_pin, HIGH);
delay (1000);
}
Else print "Distance= " and print the distance and set the buzzer to low.
else {
Serial.print (" Distance= ");
Serial.println (distance);
digitalWrite (buzzer_pin, LOW);
delay (1000);
}
}