This is an example of reading the light sensor value using ADC. Convert the analog value to a formula and serial it with a value between 0 \ ~ 3.3V It shows on the screen through the port. Turns the LED on or off compared to the specified analog value.
- WIZwiki-W7500 board
- USB cable
- Jumper wire
- PGM5537D (CDS Photo Resistor)
The overall circuit diagram is as follows.
Here is an example code.
Open the page below and compile by importing the program with "Import this program".
Or, compile after copying and pasting the following code to main.c in the mbed environment.
Refer to the link below for the specifications of the illuminance sensor.