The distance sensor (HC-SR04) is used to measure distance using ultrasonic waves.

The sensor sends pulses of ultrasonic waves, which bounce off an object and come back to the sensor. The time taken by the ultrasonic waves to return to the sensor tells how far the object is from the sensor.

Did you know? Bats use the same principle to detect obstacles and food when they fly!


  1. Water Tank Monitor: sensor measures water level of the tank to alert when it is full or empty.
  2. Smart Traffic Light: sensor detects when vehicles are nearby to accordingly change traffic signal light.
  3. Parking Sensor: sensor detects when vehicles are parked too close to a gate or wall to alert the driver.
  4. Automatic Light- LDR based: sensor detects when an object is close enough to switch on a light.



The port named "Ultrasonic Sensor" on the SNT Kit PCB, where: