int max_ultrasonic_distance_cm = 400; // set the maximum measureable distance for the ultrasonic sensor to 400cm NewPing sonar(ULTRASONIC_TRIGGER, ULTRASONIC_ECHO ...
A small PlatformIO/Arduino project that measures distance using an ultrasonic sensor (HC-SR04 or similar) and prints the measured distance over the serial port. This README explains how to open the ...