EasyManua.ls Logo

Keyestudio ESP32 - 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
We adopt “for” statement to increase a variable from 0 to 255, and define the variable as PWM output (analogWrite(pin,
value)). By the way, a delay time may reinforce the control of LED shining time. Next, we use another “for” statement
to decrease it from 255 to 0 with a delay time to control LED dimming process.
1. Drag the two code blocks.
9.2. Scratch Project 171

Table of Contents