Views: 2 Author: Site Editor Publish Time: 2020-09-22 Origin: Site
Step 1: Parts list
·Arduino UNO board
·SR04 ultrasonic transducer sensor
·USB cable type A/B
·Universal 4-pin Grove cable
Step 2: Connect the 200KHz ultrasonic transducer to the Arduino development board
Use a universal 4-pin grove cable to connect the ultrasonic sensor in pin D7 to the arduino board. Using the USB A/B cable to connect the arduino development board to the computer. The distance between the sensor and the ground is 128 mm.
Step 3: Write the code-or download the code from here.
After uploading the code to the arduino, you should see something similar when you open the serial monitor.You can edit the interval in the if statement to match the object to be counted. In the example, the height of the ultrasonic transduce distance measurement is 40 mm, 53 mm and 72 mm.
Products | About Us | News | Markets and Applications | FAQ | Contact Us