EasyManua.ls Logo

Keyestudio ESP32 - 3. Wiring Diagram; 4. Test Code

Keyestudio ESP32
344 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ESP32 Starter Kit
3. Wiring Diagram
4. Test Code
1.Drag the two basic blocks and put a “variable” block between them. Set the variable type to int, name to angle, and
assign 0 as its initial value.
2. Servo gradually rotates from 0° to 180°:
Add a repeat block and set the repeat times to 180(180 angles). Drag a “change variable” and a “servo” block and put
them in the repeat one. Name the variable “angle” and select the mode “++”. Set Servo PIN to IO4 and degree to the
named variable. Dont forget to delay 15s.
224 Chapter 9. Scratch Tutorial

Table of Contents