Components and supplies
Resistor 10k ohm
Jumper wires (generic)
Breadboard (generic)
Arduino UNO
LDR, 5 Mohm
Apps and platforms
Arduino IDE
Project description
Code
Code
arduino
The program prints the value of LDR to Serial Monitor
Downloadable files
Breadboard Diagram
Make connections as shown in the breadboard diagram
Breadboard Diagram
Connections
The figure shows the close up of the connections
Connections
Comments
Only logged in users can leave comments
blaavane
2 years ago
thank you buddy, i copied you and my teacher said good work, he said he was happy that i atleast managed to learn something from his classes
Anonymous user
2 years ago
thank you buddy, i copied you and my teacher said good work, he said he was happy that i atleast managed to learn something from his classes
Anonymous user
3 years ago
Hi I was wondering if you could help me with a project I am working on that is similar to this
Anonymous user
6 years ago
I often have the need to determine daylight or darkness with the LDR and have found it advantageous to adjust the resistor to satisfy a logical LOW or HIGH for digital input. I've used this approach on the ESP8266 and ESP8285 as well that have limited analog inputs.
peterbryenton
2 years ago
Thank you for this. As a beginner, I learned much from your example, both hardware and code.