Robots Atlas>ROBOTS ATLAS

Arduino for Beginners · Analog Signals: ADC and PWM

Photoresistor: your first analog sensor

Analog Signals: ADC and PWM

Introduction

A photoresistor (LDR, Light Dependent Resistor) is your first real sensor that links an analog reading to a physical phenomenon — light intensity. The LDR alone is just a resistor, so you cannot read it with analogRead() directly; you need a voltage divider with a fixed resistor (typically 10 kOhm). In this lesson you build the divider, understand how the resistance changes (bright = low resistance, dark = high resistance), interpret the raw 0-1023 value as a light level, and learn a simple day/night threshold — no lux, but a real sensor in your hand.