EasyManua.ls Logo

Keyestudio ESP32 - 5. Test Result; 6. Knowledge Expansion

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
(continued from previous page)
}
5. Test Result
After connecting the wiring and uploading code, open serial monitor to set baud rate to 9600, and the analog value will
be displayed, within the range of 0-4095.
6. Knowledge Expansion
We will control the brightness of LED via a potentiometer. As we know, it is influenced by PWM. However, the range
of analog value is 0-4095 while that of PWM is 0-255. Thus, a “map(value, fromLow, fromHigh, toLow, toHigh)”
function is needed.
Wiring Diagram
8.5. Arduino Project 115

Table of Contents