T ThinkEdge Learn

Arduino — Fade an LED with PWM

analogWrite on D9 — the smoothest way to dim an LED

Arduino PWM analogWrite LED
Arduino LED project for beginners · Tier 1 · Basics · Easy · 20 min · Arduino Uno

What you will learn

What you will need

Component
1× Arduino Uno R3
1× LED (yellow)
1× 220Ω resistor
1× breadboard
2× jumper wires

Step by step

Take it further

Practise it before you build it

Wire this circuit in the ThinkEdge Learn simulator first. The simulator runs a real Arduino sketch against a modified-nodal-analysis solver, so the LED on screen actually lights when the current is right — no hardware, no burnt components, and a class can try it in a browser.

Open the interactive lab See plans for your class

Related projects

Arduino — Blink Without DelayUse millis() instead of delay() — the right way to blink Arduino — LED Chaser (Knight Rider)5 LEDs that light up in sequence, like KITT from Knight Rider Arduino — Button + Buzzer DoorbellPress the button, hear a tone. The classic Arduino starter. Arduino Nano — Temperature on Serial MonitorRead the room temperature every 2 seconds and print it Arduino — Light-Activated Night LampLDR + LED — the LED turns on automatically when it gets dark LDR — Sunrise Alarm ClockWhen the sun rises, the room wakes up with a soft glow

Guides that use this project

10 guides on the site build this project as part of a longer explanation. The guide says why the circuit works; this page says how to wire it.

How to Learn RoboticsHow to learn robotics without a degree: the order to learn electronics, code and control in, how long each stage takes, and the projects that prove each one landed. Robotics for BeginnersRobotics for beginners: five projects that take you from a blinking LED to a robot that steers itself, with the parts and the mistakes at each step. Arduino Projects for BeginnersTen Arduino projects for beginners that really work, in the order that makes them easiest, with the parts each one needs and the mistake that catches people out. Raspberry Pi Pico: Why This Microcontroller Is a Teaching BreakthroughThe Raspberry Pi Pico is a 3.3 V microcontroller with programmable I/O and no radios. How its hardware differs from an Arduino Uno, and what to build with it. Smart Lighting: The Driver, the Controller and the RadioSmart lighting is a driver, a controller and a radio. Learn PWM, current limits, MOSFET switching and flicker, then build a lamp you can query. How to Learn ArduinoHow to learn Arduino properly: an eight-week plan from a blinking LED to real builds, with the parts to buy first and the mistake that slows most beginners down. Arduino Cloud EditorWhat the Arduino Cloud Editor is, what it does that the desktop IDE does not, and the honest limits you hit when a class runs entirely in a browser. Tinkercad CircuitsTinkercad Circuits is a free browser simulator for Arduino. What it teaches well, where it stops, and why it is a good first step before a real board. Arduino IDE Download and SetupWhere to download the Arduino IDE safely, which version to pick, the board manager and library manager steps, and the three install problems almost everyone hits. arduino.cc and the Official Arduino Resourcesarduino.cc is the official Arduino site: the language reference, the board specs, the library registry and the free learning resources worth using in class.

Where this project sits

It is also part of these lists, which is how a class usually finds it.

Arduino LED projects for beginners36 projects in this list

Try the full simulator with your class

103 guided circuit projects, 21 lessons and an in-browser Arduino simulator. The first 15 projects are free, no account needed. One licence covers a whole school.