Learn electronics
Guides to the parts and ideas behind every build: what a microcontroller is, how each sensor works, which board to start with. Every program in them runs on a real board, and most run in the free browser simulator too.
Getting started
- What is a microcontroller? · A microcontroller is a whole computer on one chip that reads sensors and drives lights, motors and sound. How one works, and how to program your first.
- How to learn electronics at home: a beginner's roadmap · Learn electronics at home in eight stages, from your first blinking LED to a working control panel, with a milestone for each and a free simulator to start.
- What you need to start learning electronics: the real shopping list · The real list: a board, a USB cable that carries data, a breadboard, jumper wires, four resistor values and some LEDs. What's optional, and why no soldering.
- Electronics for teens: a parent's guide · What teens actually learn from electronics, what they need, whether it's safe, and how to help when you don't know electronics yourself. For ages 12 and up.
- C++ or MicroPython: which should you learn on a microcontroller? · C++ or MicroPython for your first microcontroller? The same program in both, the honest trade-offs in speed, errors and libraries, and how to choose.
- What resistor do I need for an LED? · The right resistor for an LED on 5 V and 3.3 V boards, worked out by LED color with real numbers. Why 220 Ω is the standard, and when to go bigger or smaller.
- How to read a resistor color code: 4 and 5 bands · Read any resistor's color bands, four or five: the chart, which end to start from, the kit's 220, 1k, 10k and 100k worked out, and the backwards-read trap.
Choosing a kit
- Arduino Uno or Raspberry Pi Pico: which should you learn first? · Uno-style boards or the Raspberry Pi Pico for a first microcontroller? C++ or Python, 5 V or 3.3 V, Wi-Fi or not, and which one fits what you want to build.
- Electronics gifts for teens, 2026: an honest list · Circuit and code kits, a camera robot car, a computer in a keyboard: honest gift picks for teens, ours and other brands', with prices checked November 2026.
- The best electronics kits for adult beginners · Learning electronics as an adult: pick a kit by how you learn (filmed lessons, a printed book or free videos) and what you want to build. Honest picks.
- Homeschool electronics: a one-semester plan · An 18-week homeschool electronics plan built on 30 Days Lost in Space: two lessons a week, what each week teaches, and how to check the work yourself.
- Snap Circuits or a microcontroller kit: when to move up · Snap Circuits teaches how circuits work, with no code. The signs a child is ready for a breadboard and a programmable board, and what changes when they move up.
Sensor modules
- Every module in the 37-in-1 sensor kit, explained · What each module in the 37-in-1 sensor kit senses, whether it reads as digital, analog or both, and a filmed walkthrough with code for each one.
- KY-004 button module: how it works, wiring and code · The KY-004 push button module: what each pin does, why it reads LOW when pressed, wiring to an Uno-compatible board, and tested code for one clean press.
- KY-008 laser module: how it works, wiring, code and safety · The KY-008 laser module: a 650 nm red laser diode you switch from one pin. How to use it safely, wiring to an Uno-compatible board, code and a laser tripwire.
- KY-009 SMD RGB LED module: wiring, resistors and code · The KY-009 SMD RGB LED module: why it needs three resistors, which pins to use on an Uno-compatible board, the course's color-fade code and the label mix-up.
- KY-011 and KY-029 two color LED modules: wiring and code · The KY-011 (5 mm) and KY-029 (3 mm) red and green LED modules: which pin is which, wiring to an Uno-compatible board, the course's fade code and a status gauge.
- KY-012 active buzzer module: how it works, wiring and code · The KY-012 active buzzer: why it beeps at one pitch on its own, wiring to an Uno-compatible board, what the course's code really does, and alarm patterns.
- KY-016 RGB LED module: pinout, wiring and code · The KY-016 RGB LED module: what the resistors on it do, wiring R, G and B to PWM pins, the course's fade code with its two traps, and a sketch for exact colors.
- KY-019 relay module: how it works, wiring, code and safety · How the KY-019 5 V relay module works, wiring its pins and COM, NO and NC terminals to an Uno-compatible board, the course's code, and switching loads safely.
- KY-023 joystick module: how it works, wiring and code · The KY-023 joystick: two potentiometers and a push switch. Wiring VRx, VRy and SW to an Uno-compatible board, the course's code, and steering a servo.
- KY-027 magic light cup module: how it works, wiring and code · The KY-027 magic light cup: a mercury tilt switch with its own LED. How to wire two cups to an Uno-compatible board and the code that pours light between them.
- KY-040 rotary encoder module: how it works, wiring and code · How the KY-040 rotary encoder works, wiring CLK, DT and SW to an Uno-compatible board, the course's code line by line, and when to switch to interrupts.
- KY-002 shock sensor module: how it works, wiring and code · How the KY-002 vibration switch works, how to wire it to a HERO Board or any Uno-compatible board, and code that catches every knock.
- KY-003 Hall magnetic sensor module: how it works, wiring and code · The KY-003 Hall effect sensor switches when a magnet comes close. How it works, wiring to a HERO Board, the course's code, and how it differs from the KY-024.
- KY-010 light blocking module (photo interrupter): how it works, wiring and code · The KY-010 light blocking module sees anything that breaks the beam across its slot. How it works, wiring to a HERO Board, and code to detect and count.
- KY-017 mercury tilt switch module: how it works, wiring and code · The KY-017 is a mercury tilt switch: a bead of liquid metal closes a contact when the board tips. How it works, wiring, the course's code and safe handling.
- KY-020 ball tilt switch module: how it works, wiring and code · The KY-020 tilt switch uses a rolling metal ball to tell if the board is upright or tipped. How it works, wiring, two sketches from the course, and fixes.
- KY-024 linear Hall sensor module: how it works, wiring and code · The KY-024 measures magnetic field strength and polarity, with an analog and a digital output. Wiring, the walkthrough's code, and how to set the knob.
- KY-025 reed switch module: how it works, wiring and code · The KY-025 reed switch closes when a magnet comes near. How it works, wiring to a HERO Board, the course's code, and how to tune its trim pot step by step.
- KY-031 tap sensor (knock sensor) module: how it works, wiring and code · The KY-031 tap sensor, also sold as a knock sensor: how its spring works, wiring to a HERO Board, the course's tap counter, and how to stop double counts.
- KY-032 infrared obstacle avoidance sensor: how it works, wiring, code and tuning · The KY-032 sees objects by reflected infrared light. Wiring to a HERO Board, the course's code, the EN pin, and the two-knob tuning that makes it reliable.
- KY-033 line tracking sensor module: how it works, wiring and code · The KY-033 tells a dark line from a light floor with reflected infrared, the sensor behind line-following robots. Wiring, the course's code and tuning.
- KY-001 temperature sensor module (DS18B20): wiring and code · Wire the KY-001 DS18B20 temperature module to the HERO Board, read it over 1-Wire with the SensorKit course's code, and fix the -127 and 85 readings.
- KY-015 temperature and humidity module (DHT11): wiring and code · How the KY-015's DHT11 sends temperature and humidity on one wire, how to wire it to the HERO Board, and the SensorKit code with a fix for nan readings.
- KY-018 photoresistor module: wiring, code and a night light · Why the KY-018's reading rises in the dark, how to wire it to the HERO Board, set light thresholds that hold, and build a night light that doesn't flicker.
- KY-022 IR receiver module: wiring and remote control code · Decode a TV remote with the KY-022: how its 38 kHz receiver works, wiring to the HERO Board, IRremote code, and why held buttons print FFFFFFFF.
- KY-026 flame sensor module: wiring, code and calibration · What the KY-026 flame sensor really sees, how to wire it to the HERO Board, the SensorKit code, and real bench distances for setting its trim pot.
- KY-028 digital temperature module: thermistor wiring and code · The KY-028 is a thermistor and a comparator: a temperature switch you set with a screw. How it works, wiring to the HERO Board, the code and calibration.
- KY-036 touch sensor module: wiring, code and calibration · Wire the KY-036 metal touch sensor to the HERO Board safely, set its trim pot with the click method, and turn chattery touches into one clean toggle.
- KY-037 big sound sensor module: wiring, code and a clap switch · How the KY-037's microphone and comparator hear a clap, wiring to the HERO Board, setting the trim pot in a quiet room, and a clap switch that works.
- KY-038 small sound sensor module: wiring, code and a loudness meter · The KY-038's small microphone suits close sounds: breath, taps, a voice up close. Wiring to the HERO Board, the course code, and a loudness reading that works.
- KY-039 heartbeat sensor module: wiring and pulse code · How the KY-039 sees your pulse through a fingertip, wiring to the HERO Board, and the SensorKit code that turns a noisy signal into beats per minute.
Projects
- Build a traffic light with three LEDs · Wire three LEDs to the HERO Board and code a traffic light: the parts, the wiring, the tested code explained, and how to add a crossroads or a crossing button.
- Build a night light that turns on in the dark · An LED that switches on when the room gets dark: wire a photoresistor divider to the HERO Board, set the threshold, then add a light meter on an OLED screen.
- Play a melody on a passive buzzer · Make a passive buzzer play a tune: two wires to the HERO Board, notes and lengths in two arrays, tone() explained, and how to write your own melody with rests.
- Build an RGB LED mood lamp · Fade an RGB LED through six colors with PWM and name each one on an OLED screen: wiring with three resistors, the tested code, and how color mixing works.
- Build a keypad door lock with an OLED screen · Build a 4-digit keypad code lock that answers on an OLED screen: the parts, a 12-wire hookup, the full tested code explained, and fixes for the usual mistakes.
- Build a countdown timer with a knob and a 4-digit display · Set the seconds with a knob, press to start, and a TM1637 4-digit display counts down to a beep: the wiring, the tested code, and millis() timing explained.
- Build a rotary encoder menu on an OLED screen · Turn a knob to move through a menu on a 128x64 OLED and press it to pick: the wiring, the tested code with an interrupt, and how to grow it into real settings.
- Steer a servo with a joystick · Push a joystick and a servo turns to match: the wiring, the tested code with map() and the Servo library, and the fixes for jitter and a board that resets.
Simulators
- A free simulator for real microcontroller circuits · Wire real parts and run real code on a virtual HERO Board, HERO XL or Raspberry Pi Pico in your browser. Free, nothing to install, no account to start.
- Arduino Uno simulator: run your sketch on a virtual HERO Board · Run Arduino code on a simulated Uno-compatible board in your browser: a real ATmega328P, 46 parts, the Serial Monitor, and one-click upload to a real board.
- Arduino Mega simulator: the HERO XL in your browser · Simulate a Mega 2560-compatible HERO XL in your browser: 54 digital pins, 16 analog inputs, the parts and libraries of the Uno, and upload to the real board.
- Raspberry Pi Pico simulator: real MicroPython in your browser · Run MicroPython on a simulated Raspberry Pi Pico WH in your browser: the real firmware on an emulated RP2040, with LEDs, buttons, sensors and a 4-digit display.
Reference