EasyManua.ls Logo

SunFounder ESP32

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
Loading...
SunFounder ESP32 Starter Kit
Code
Note:
Open the 5.7_feel_the_light.ino file under the path of esp32-starter-kit-main\c\codes\5.
7_feel_the_light.
After selecting the board (ESP32 Dev Module) and the appropriate port, click the Upload button.
Always displaying “Unknown COMxx”?
After the code is uploaded successfully, the Serial Monitor prints out the photoresistor values from 0 ~ 4095. The
stronger the current ambient brightness, the larger the value displayed on the serial monitor.
Note: For the ESP32, the resolution is between 9 to 12 and it will change the ADC hardware resolution. Else value
will be shifted.
Default is 12 bits (range from 0 to 4096) for all chips except ESP32S3 where default is 13 bits (range from 0 to 8192).
You can add analogReadResolution(10); to setup() function to set a different resolution, such as 20.
1.23. 5.7 Feel the Light 85

Table of Contents