SunFounder ESP32 Starter Kit
2. Scripting for the Parrot Sprite
Now script the Parrot sprite, which is in flight and the flight altitude is determined by the detection distance of the
ultrasonic module.
• When the green flag is clicked, switch the costume every 0.2s so that it is always in flight.
• Read the value of the ultrasonic module and store it in the variable distance after rounding it with the [round]
block.
4.18. 2.15 GAME - Flappy Parrot 595