Overview:
In this experiment, we use the analog port A0 of SUNFOUNDER MEGA2560 to read the resistance of photoresistor after processing by the master control chip built-in ADC module, and display it on the serial monitor.
Components:
SUNFOUNDER MEGA2560 * 1
Photoresistor * 1
Resistor (10K Ohm) * 1
USB Cable * 1
Jumper wires
Steps:
First, connect the circuit
Second, program (Please refer to example code in CD we provide)
Third, compile the program
Fourth, burn the program into SUNFOUNDER MEGA2560 board