EasyManua.ls Logo

Keyestudio ESP32 - 7. Code Explanation; Project 20: Light Pillar; 1. Description

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
Complete Code:
7. Code Explanation
1. map function. The analog value range can be converted from 0-4095 to 0-255.
2. Read the analog value of potentiometer by setting its pin.
9.2.23 Project 20: Light Pillar
1. Description
The resistance(less than 1K) of the photoresistor varies from the light, thus it can control the brightness of the dot
matrix. When controlling, we connect this resistor to an analog pin on the board to monitor the change of resistance.
In this way, the light automatically controls the brightness of the display.
Besides, the photoresistor is widely applied to our daily life. For instance, a curtain automatically opens or closes
according to the outer light intensity.
9.2. Scratch Project 273

Table of Contents