Arduino Ultrasonic Sensor HC-SR04 Hack for Smart Fans
Arduino ULTRASONIC Sensor HC-SR04 Hack for Smart Fans!
Arduino ULTRASONIC Sensor HC-SR04 Hack for Smart Fans!
Press the serial monitor, and you can see that the measured distance is 9.8cm-10.1cm with an error of about 0.2cm.
An ultrasonic sensor used for distance measurement, widely applied in robotics to avoid obstacles and measure distances.
Its module uses Trig to trigger distance measurement,
which emits 8 40kHz square waves and