Source: https://mokxi.com/ideas/ldr-projects
Updated: 2026-11-17

Projects / Project ideas
Project ideas by part

# Projects with a photoresistor

17 Mokxi projects use a photoresistor (8 beginner, 7 intermediate and 2 advanced). They run on Arduino Uno and Raspberry Pi Pico boards, and 2 need no board at all. Here are all of them, from “Pico W photoresistor divider on GP28” to “Solar tracker”. Each card says what the project does, the board and parts it needs and its level, and Open in the simulator runs it in your browser in one click, with no account.

First project

## How to pick your first one

- Start with “Pico W photoresistor divider on GP28”, a beginner project that needs a resistor and a photoresistor.
- Arduino Uno runs 11 of them, Raspberry Pi Pico 3 and 2 need no board at all. Start on the board you have, or on an Arduino Uno if you are buying one.
- The parts used most here are the LED (12 projects), the potentiometer (4) and the push button (3). With those on hand, most of this list is open to you.
- Before you build one on a real bench, read the photoresistor wiring guide for your board below. It gives every pin and the voltage notes.

Projects

## 17 projects ready to run

### Pico W photoresistor divider on GP28

MicroPython on a Pico W: a photoresistor and a 10k divide 3.3 V with the middle on GP28, and ADC(28) prints the light level twice a second.

Board

Raspberry Pi Pico W

Parts

Resistor, photoresistor

Level

Beginner

Open in the simulator

### Dinosaur game player: light sensor on A0, servo on 9

A photoresistor on A0 watches the screen of the browser’s dinosaur game; when a dark cactus passes over it.

Board

Arduino Uno R3

Parts

Photoresistor, resistor, servo motor

Level

Beginner

Open in the simulator

### Photoresistor night light: A0 dims the LED on pin 9

A photoresistor and a 10k resistor in a divider on A0 set the brightness of an LED on pin 9: the darker the room, the brighter the LED.

Board

Arduino Uno R3

Parts

Photoresistor, resistor, LED

Level

Beginner

Open in the simulator

### MicroPython night lamp: a photoresistor dims an LED

MicroPython on an ESP32: a photoresistor and a 10k on GPIO 36 set the LED on GPIO 25, which glows brighter as the room gets darker.

Board

ESP32-DevKitC V4

Parts

Resistor, photoresistor, LED

Level

Beginner

Open in the simulator

### Light meter: photoresistor on A0, LEDs on pins 5 to 12

A photoresistor and a 10k resistor on A0 set how many of eight LEDs on pins 5 to 12 light: none in the dark, all of them in bright light.

Board

Arduino Uno R3

Parts

Resistor, LED, photoresistor

Level

Beginner

Open in the simulator

### Night light with a light sensor

A light-dependent resistor in a divider fades a lamp up when the room goes dark. Drag the slider on the sensor.

Board

Arduino Uno R3

Parts

Photoresistor, resistor, LED

Level

Beginner

Open in the simulator

### MicroPython night lamp on a Pico: light sensor on GP26

MicroPython on a Raspberry Pi Pico: a photoresistor and a 10k on GP26 set the LED on GP15, so the darker it gets, the brighter the LED.

Board

Raspberry Pi Pico

Parts

Resistor, photoresistor, LED

Level

Beginner

Open in the simulator

### Rescue beacon

A white LED flashes SOS from a table of lengths, but only in the dark: a light sensor wakes it at dusk and a button forces it on.

Board

Arduino Uno R3

Parts

Resistor, LED, push button, photoresistor

Level

Beginner

Open in the simulator

### LM393 night light with a ULN2003A

An LM393 compares an LDR with a knob, its open-collector output pulled up by 10 k.

Board

No board

Parts

Photoresistor, resistor, potentiometer, LM393 dual comparator, ULN2003A Darlington array, +1 more

Level

Intermediate

Open in the simulator

### Photocell light meter

A photocell and a 10k resistor on A0 set how many of eight LEDs a 74HC595 lights: none in the dark, all eight in bright light.

Board

Arduino Uno R3

Parts

74HC595 shift register, resistor, LED, photoresistor

Level

Intermediate

Open in the simulator

### Dark detector

An op-amp comparator, an LDR and a pot light an LED when the room goes dark, no board, on a half-size breadboard.

Board

No board

Parts

Photoresistor, resistor, potentiometer, op-amp, LED

Level

Intermediate

Open in the simulator

### Automatic curtain opener with a stepper motor

A NEMA 17 on an A4988 homes to an end switch, opens the curtain at dawn and closes it at dusk, with a button to open, close or stop and a speed knob.

Board

Arduino Uno R3

Parts

A4988 stepper driver, NEMA 17 stepper motor, DC jack and adapter, capacitor, limit switch, +4 more

Level

Intermediate

Open in the simulator

### Pico W light theremin: light sets the pitch

MicroPython on a Pico W: a photoresistor on GP28 learns its range for five seconds, then the light level sets a passive buzzer’s pitch on GP15.

Board

Raspberry Pi Pico W

Parts

Piezo speaker, transistor, resistor, photoresistor, LED

Level

Intermediate

Open in the simulator

### LM358 dark switch with an Arduino

An LM358 comparator lights an LED when the LDR goes dark, past a threshold set by a knob.

Board

Arduino Uno R3

Parts

Photoresistor, resistor, potentiometer, LM358 dual op-amp, LED

Level

Intermediate

Open in the simulator

### Photocell bar graph on a 74HC595

A photocell and a 1k resistor on A0 set how many of eight LEDs a 74HC595 lights, with data on pin 12, clock on 9 and latch on 11.

Board

Arduino Uno R3

Parts

74HC595 shift register, resistor, LED, photoresistor

Level

Intermediate

Open in the simulator

### Plant monitor: light, soil, temperature and a pump

A photoresistor on A0, a soil moisture sensor on A1 and a thermistor on A2 report to an I2C LCD; when the soil dries out.

Board

Arduino Uno R3

Parts

Photoresistor, resistor, 10k NTC thermistor, L293D motor driver, capacitive soil moisture sensor, +2 more

Level

Advanced

Open in the simulator

### Solar tracker

Four light sensors steer a pan and tilt servo pair, an INA219 measures the panel, and the sketch alternates tracked and fixed windows.

Board

Arduino Uno R3

Parts

Photoresistor, resistor, servo motor, INA219 current monitor, solar panel, +2 more

Level

Advanced

Open in the simulator

Keep going

## Wiring, libraries and more ideas

The photoresistor part page Every project ideas list

### Wiring guides

- LDR to Arduino Uno
- LDR to Arduino Nano
- LDR to ESP32

### Library pages

- Servo library
- Adafruit INA219 library
- FastAccelStepper library
- LiquidCrystal I2C library

### More project ideas

- Arduino Uno project ideas
- Raspberry Pi Pico project ideas
- Electronics projects with no code
- ESP32 project ideas
- LED projects for Arduino, ESP32 and Pico
- Projects with a potentiometer
- Projects with a push button
- Projects with a 74HC595 shift register
- Servo motor projects
- Projects with an A4988 stepper driver
- Projects with a capacitor
