SunFounder ESP32 Starter Kit
4.18.2 Build the Circuit
An ultrasonic sensor module is an instrument that measures the distance to an object using ultrasonic sound waves. It
has two probes. One is to send ultrasonic waves and the other is to receive the waves and transform the time of sending
and receiving into a distance, thus detecting the distance between the device and an obstacle.
Now build the circuit according to the following diagram.
4.18.3 Programming
The effect we want to achieve is to use the ultrasonic module to control the flight height of the sprite Parrot, while
avoiding the Paddle sprite.
1. Add a sprite
Delete the default sprite, and use the Choose a Sprite button to add the Parrot sprite. Set its size to 50%, and move
its position to the left center.
592
Chapter 4. Play with Scratch
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?