EasyManuals Logo

SunFounder ESP32 User Manual

Default Icon
771 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #537 background imageLoading...
Page #537 background image
SunFounder ESP32 Starter Kit
2. Left arrow sprite
When this sprite is clicked, it broadcasts a message - turn, then sets digital pin12 to low and pin14 to high, and sets the
variable flag to 1. If you click the left arrow sprite, you will find that the motor turns counterclockwise, if your turn is
clockwise, then you swap the positions of pin12 and pin14.
There are 2 points to note here.
[broadcast]: from the Events palette, used to broadcast a message to the other sprites, when the other sprites
receive this message, it will perform a specific event. For example, here is turn, when the star sprite receives
this message, it executes the rotation script.
variable flag: The direction of rotation of the star sprite is determined by the value of flag. So when you create
the flag variable, you need to make it apply to all sprites.
4.12. 2.9 Rotating Fan 531

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the SunFounder ESP32 and is the answer not in the manual?

SunFounder ESP32 Specifications

General IconGeneral
BrandSunFounder
ModelESP32
CategoryController
LanguageEnglish