ESP32 Starter Kit
6. Expansion Code
In this expansion project, we use this photoresistor to sensing the ambient light intensity. The middle two columns are
included in this experiment to represent light intensity. The lighter it is, the more the lighting LED will be. This forms
a “light pillar”.
Wiring Diagram
1. Drag the two basic blocks.
2. In “Matrix”, initialize the dot matrix display and set pin CS to IO15. Add a “brightness setting” block and assign
to 3.
3. Drag a “variable” block. Set its range to Local, type to int and name to light.
9.2. Scratch Project 277