This tutorial instructs you how to use an Raspberry Pi and an LDR light sensor module to find out the amount of light in an area. The light sensor used in this tutorial is a photoresistor, which is also called light-dependent. I built a small light-sensing system using an LDR, an LED, and a buzzer to detect darkness and trigger an alert. The LDR's analog output is read through the Arduino's ADC, and when the light level drops below a set threshold, the system automatically switches on the LED and activates the buzzer. You'll often find them in remote-control receivers, pulse oximeters, and line-following robots. This article is part of my Arduino for Beginners series (lesson #10 out of 24). If you'd like to learn how to program the ESP32 with MicroPython, visit this ESP32 MicroPython - Light Sensor tutorial.