What if your light switch required a secret PIN code? Or a joystick cheat combo? Or just… clapping like it’s 1994?
I built 10 different Arduino-powered light switch mods using a single ELEGOO UNO Super Starter Kit, a servo, and a 3D printed servo mount. Every mod uses the same base — just swap the sensor and upload a different sketch.
Below you’ll find complete wiring diagrams, Arduino code (free downloads), and build notes for every single one. Whether you’re making content, learning Arduino, or just want to annoy your family — this is your guide.
What You Need (For All 10 Mods)
One kit covers almost everything. The ELEGOO UNO Super Starter Kit includes the Arduino board, servo, LCD, joystick, IR remote, sensors, LEDs, buzzer, resistors, and jumper wires. The only extra part is a membrane keypad for the PIN pad mod.
Parts List
| Item | Included In Kit? | Link |
|---|---|---|
| ELEGOO UNO Super Starter Kit | — (this IS the kit) | Amazon |
| Servo Motor (SG90) | ✅ Yes | Included |
| LCD 1602 Display | ✅ Yes | Included |
| Joystick Module | ✅ Yes | Included |
| IR Remote + Receiver | ✅ Yes | Included |
| HC-SR04 Ultrasonic Sensor | ✅ Yes | Included |
| Photoresistor | ✅ Yes (x2) | Included |
| Thermistor | ✅ Yes | Included |
| Tilt Switch | ✅ Yes | Included |
| Potentiometer | ✅ Yes | Included |
| Passive Buzzer | ✅ Yes | Included |
| LEDs, Resistors, Jumper Wires | ✅ Yes | Included |
| 3×4 Membrane Keypad (Pin Pad mod only) | ❌ No | Amazon |
| 3D Printed Servo Mount | ❌ (3D print it) | MakerWorld (free) |
The Shared Base: Servo Wiring
Every mod uses the same 3D printed servo switch plate mount and the same three servo connections. This never changes — only the trigger/input side changes per mod.

| Servo Wire | Arduino Pin |
|---|---|
| 🟠 Orange (Signal) | D9 (PWM) |
| 🔴 Red (Power) | 5V |
| 🟤 Brown (Ground) | GND |
Servo angles (calibrated for the servo switch plate mount):
- 20° — Switch OFF
- 60° — Neutral (resting, no pressure on toggle)
- 100° — Switch ON
The arm swings to 100° or 20° to flip the toggle, holds for half a second, then returns to 60° neutral so there’s no constant pressure on the switch.
Mod 1: PIN Pad Switch 🔢
Enter a 4-digit code to unlock the lights. Wrong code? Red LED flash and a denied buzzer. Correct code? Green LED and the servo flips.
This is the only mod that requires a part not in the ELEGOO kit — a 3×4 membrane keypad.

| Component | Arduino Pin | Notes |
|---|---|---|
| Keypad Rows 1–4 | D2, D3, D4, D5 | Left 4 keypad pins |
| Keypad Cols 1–3 | D6, D7, D8 | Right 3 keypad pins |
| Green LED (+) | D11 | Through 220Ω resistor → GND |
| Red LED (+) | D12 | Through 220Ω resistor → GND |
| Buzzer (+) | D13 | Optional — beep sounds |
Libraries needed: Keypad.h, Servo.h (install Keypad via Library Manager). Default code: 1234. Press * to clear, # to submit.
Mod 2: Timer Switch ⏱️
Set a countdown on the LCD display. When it hits zero, the servo flips. The countdown builds tension on camera, and the buzzer alarm at zero is a satisfying payoff.

| Component | Arduino Pin | Notes |
|---|---|---|
| LCD RS / Enable | D7 / D8 | |
| LCD D4–D7 | D10, D11, D12, D13 | 4-bit mode |
| LCD VSS / VDD | GND / 5V | V0 via potentiometer for contrast |
| Set Button | D2 | INPUT_PULLUP — cycles time presets |
| Start Button | D3 | Begins countdown |
| Buzzer | D5 | Alarm beep at zero |
Library: LiquidCrystal.h (built into Arduino IDE). Presets: 10s, 30s, 1min, 2min, 5min, 10min.
Mod 3: Clap Switch 👏
Clap twice to toggle the lights. The piezo buzzer in the kit doubles as a crude microphone — it generates voltage spikes on loud sounds that the Arduino can detect.

| Component | Arduino Pin | Notes |
|---|---|---|
| Piezo Buzzer (+) | A0 | Analog input — reads voltage spikes |
| Piezo Buzzer (−) | GND | |
| 1MΩ Resistor | Across A0 and GND | Bleeder resistor — stabilizes signal |
Calibration: Open Serial Monitor at 9600 baud. Claps spike to 100–300+, ambient noise is under 30. Adjust CLAP_THRESHOLD in the code. If your kit has a dedicated sound sensor module, use that instead — same code, better signal.
Mod 4: Proximity Switch 📡
Walk within 2 feet and the lights flip on. Walk away and they turn off. The HC-SR04 ultrasonic sensor measures distance. Completely hands-free.

| Component | Arduino Pin | Notes |
|---|---|---|
| HC-SR04 VCC / GND | 5V / GND | |
| Trig | D6 | Sends ultrasonic pulse |
| Echo | D7 | Receives reflected pulse |
Uses hysteresis to prevent flickering: turns ON at 50cm, OFF at 80cm. Adjustable in the code.
Mod 5: IR Remote Switch 📺
Flip your lights from the couch. The ELEGOO kit includes a small IR remote and receiver. Point, click, lights toggle. Maximum laziness achieved.

| Component | Arduino Pin | Notes |
|---|---|---|
| IR Receiver Signal | D2 | Data output |
| IR Receiver VCC / GND | 5V / GND |
Library: IRremote.h (install via Library Manager). The sketch prints button codes to Serial Monitor so you can map specific buttons — or use toggle mode where any button press flips the switch.
Mod 6: Cheat Code Switch 🎮
↑ ↑ ↓ ↓ ← → to unlock the lights. A joystick on the wall. The LCD shows “ENTER CODE.” Input a directional combo to unlock. Wrong combo? “ACCESS DENIED.” This one has the most video potential.

| Component | Arduino Pin | Notes |
|---|---|---|
| Joystick VRx (horizontal) | A0 | Analog — reads left/right |
| Joystick VRy (vertical) | A1 | Analog — reads up/down |
| Joystick SW (button) | D2 | Optional — press to submit |
| Joystick VCC / GND | 5V / GND | |
| LCD wiring | D7, D8, D10–D13 | Same as Timer mod |
How the joystick works: Analog reads ~512 at center. Below 200 = Left or Up. Above 800 = Right or Down. The code detects direction, pushes it to an array, and compares against the secret combo. Default combo: UP, UP, DOWN, DOWN, LEFT, RIGHT.
Mod 7: Temperature Switch 🌡️
Room too hot? Lights flip automatically. The thermistor reads room temperature. Exceed the threshold and the servo flips. Breathe on the sensor for an instant trigger on camera.

| Component | Arduino Pin | Notes |
|---|---|---|
| Thermistor / TMP36 Signal | A0 | Analog input |
| 10KΩ Pull-down Resistor | A0 to GND | Thermistor only — not needed for TMP36 |
| Sensor VCC / GND | 5V / GND |
The sketch supports both TMP36 and thermistor — flip USE_TMP36 to true or false. Reads in °F with hysteresis.
Mod 8: Light-Activated Switch 💡
Turn off the light. It turns itself back on. The photoresistor reads ambient light level. When the room goes dark, the servo immediately flips it back. A light switch that refuses to stay off. The irony IS the content.

This is a simple voltage divider:
5V ──── [PHOTORESISTOR] ──── JUNCTION ──── [10KΩ RESISTOR] ──── GND
│
wire to A0
| Component | Arduino Pin | Notes |
|---|---|---|
| Photoresistor | One leg to A0, other to 5V | |
| 10KΩ Pull-down Resistor | A0 to GND | Required — voltage divider |
Three connections to the Arduino: 5V, A0, GND. No breadboard needed — twist the component leads together at the junction and poke them into the Arduino header pins. Calibration: Open Serial Monitor. Note reading with lights on vs off. Set DARK_THRESHOLD between those values.
Mod 9: Tilt Switch 🫨
Shake the wall plate like an Etch-a-Sketch to toggle the lights. The tilt ball switch closes a circuit when tilted. This is the simplest build — just two wires plus the servo.

| Component | Arduino Pin | Notes |
|---|---|---|
| Tilt Switch (one leg) | D2 | INPUT_PULLUP — no external resistor needed |
| Tilt Switch (other leg) | GND |
That’s it. Two wires. The code uses heavy debouncing because tilt switches are noisy. You can set a “shake threshold” to require multiple tilts before toggling.
Mod 10: Safe Crack Switch 🔐
A potentiometer on the wall like a combination safe dial. The LCD shows a target number. Turn the dial to match it — overshoot and it resets. Nail it and the servo flips. Set a 3-number combo for full safe-cracking tension.

| Component | Arduino Pin | Notes |
|---|---|---|
| Potentiometer (wiper/middle pin) | A0 | Analog — reads 0–1023, mapped to 0–99 |
| Potentiometer (outer pins) | 5V and GND | Direction doesn’t matter |
| Buzzer | D5 | Click sounds + unlock chime |
| LCD wiring | D7, D8, D10–D13 | Same as Timer mod |
The LCD shows proximity hints (“warm,” “CLOSE!”, “HIT”) as you dial. The buzzer clicks as you turn. In combo mode, overshooting resets to the first number.
Quick Reference: All 10 Mods
| # | Mod | Key Component | Primary Pins | Library | Difficulty |
|---|---|---|---|---|---|
| 1 | Pin Pad | 3×4 Keypad | D2–D8 | Keypad.h | ⭐⭐⭐ |
| 2 | Timer | LCD + Buttons | D2, D3, D7, D8, D10–D13 | LiquidCrystal.h | ⭐⭐⭐ |
| 3 | Clap | Piezo (as mic) | A0 | None | ⭐ |
| 4 | Proximity | HC-SR04 | D6, D7 | None | ⭐⭐ |
| 5 | IR Remote | IR Receiver | D2 | IRremote.h | ⭐ |
| 6 | Cheat Code | Joystick + LCD | A0, A1, D2, D7, D8, D10–D13 | LiquidCrystal.h | ⭐⭐⭐⭐ |
| 7 | Temperature | Thermistor | A0 | None | ⭐ |
| 8 | Light-Activated | Photoresistor | A0 | None | ⭐ |
| 9 | Tilt | Tilt Switch | D2 | None | ⭐ |
| 10 | Safe Crack | Pot + LCD | A0, D5, D7, D8, D10–D13 | LiquidCrystal.h | ⭐⭐⭐ |
Download All Files
Every Arduino sketch is free to download. Upload to your Arduino and go.
Arduino Sketches
⬇ Download All 10 Arduino Sketches (.zip)
Contains: pinpad_switch.ino, timer_switch.ino, clap_switch.ino, proximity_switch.ino, ir_remote_switch.ino, cheatcode_switch.ino, temperature_switch.ino, light_switch.ino, tilt_switch.ino, safecrack_switch.ino
3D Print Files
- Servo Switch Plate Mount — Free STL on MakerWorld
Getting Started
Never used an Arduino before? Here’s the quick version:
- Download the Arduino IDE (free)
- Plug in your Arduino UNO via USB
- Open one of the .ino files above
- If the sketch needs a library (like Keypad.h or IRremote.h), go to Sketch → Include Library → Manage Libraries and search for it
- Click Upload (the arrow button)
- Open Tools → Serial Monitor at 9600 baud to see debug output and calibrate sensors
Every sketch has a configuration section at the top where you can adjust thresholds, pin assignments, and servo angles without digging through the code.
Which Mod Should You Build First?
Easiest builds (one sensor, minimal wiring): Clap Switch, IR Remote, Tilt Switch, or Light-Activated Switch. Great for Arduino beginners.
Most impressive on camera: Cheat Code Switch (joystick + LCD), PIN Pad Switch (ACCESS DENIED/GRANTED drama), and Safe Crack Switch (tense dial-turning with feedback).
Most practical: Proximity Switch (hands-free!) and Timer Switch (actual sleep timer utility).
Funniest: Light-Activated Switch. Someone turns the light off, it immediately turns itself back on. It refuses to stay off. People lose their minds.
FAQ
Do I need a 3D printer?
The servo mount needs to be 3D printed (free STL on MakerWorld), but you can also use hot glue or tape to mount the servo to an existing switch plate. A 3D printer just makes it cleaner.
Will these work with a rocker switch (Decora style)?
The servo mount is designed for standard toggle switches. For rocker/Decora switches, you’d need a different mount design.
Can I use an Arduino Nano instead of the UNO?
Yes. The pin numbers are the same. The Nano is smaller, which makes it easier to fit inside an enclosure.
Do these mods require any electrical wiring?
No. The servo physically flips the existing light switch — you never touch any AC wiring. It’s purely mechanical.
Which mod is best for beginners?
The Tilt Switch or IR Remote Switch — both have minimal wiring (2-3 connections) and no extra libraries to install.
This post contains affiliate links. If you purchase through these links, I may earn a small commission at no extra cost to you. This helps support the channel and lets me keep building ridiculous things. All recommendations are genuine — I used every single one of these components in the video.
Leave A Comment