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
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?
Questions and answers