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!
Complete Video
The ultrasonic sensor is an input module that provides excellent non-contact distance detection, stable performance, ease of use, a small blind spot, and high accuracy. The measuring distance ranges from 2 centimeters to 400 centimeters, and the best part is that it is very inexpensive. It is widely used in the maker community, including applications such as robot distance measurement and obstacle avoidance, as well as liquid level detection.
1. Preparation Before Class
Please prepare the following for this lesson:
1. One
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