Remote-controlled RGB mood light
Warm, cool, rainbow or breathing: cycle lighting moods from your sofa.
Shop by category
Shop all componentsAn LED on its own would draw far too much current from an Arduino pin and burn out. A 220 ohm resistor in series limits the current to about 15 mA, which is bright and safe. Here pin D12 drives the LED through that resistor, and the same blink code now uses a variable for the pin number, so you can move the LED to another pin by changing one line.
Every part for this build comes in the Geekobot Spark Kit box, a Geekobot exclusive, together with the parts for all 24 projects, from a first blinking LED to a smart fan and a reaction game. The wiring below is the kit's own wiring.
Tick anything you already have and the total updates.
The brain of every Spark Kit project
220 ohm resistor pack: limits the LED current
Sensor Shield v5.0 from the kit: every pin has its own G, V, S header, so modules plug in with female jumpers
Follow the colours: red is power, dark grey is ground, blue is a signal.
spark_kit_02_external_led_blink.inoVerify & upload in Electrolark// Spark Kit 02: external LED blink
int led = 12;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
Use the kit's USB cable (some phone cables carry power only), install the CH340 driver on Windows if the port does not appear, and pick Tools > Board > Arduino Uno.
Turn the LED round: the long leg must go towards D12. Check that the resistor and LED share a breadboard row.
Make sure you used the 220 ohm resistor (red-red-brown), not the 10k one.
With 5 V from the pin and about 2 V across a red LED, 220 ohms lets roughly 14 mA flow: bright, and well under the pin's 20 mA comfort limit.
Yes. Change the first line to int led = 13; and the board LED will blink with yours.
Yes. It is one of the 24 projects in the Geekobot Spark Kit, and every part on the list comes in the kit box. You can also buy the parts one by one from the list above.
No. Every Spark Kit project is wired on the breadboard or the Sensor Shield with jumper wires.
7 parts: Uno R3 CH340G ATmega328p Compatible Development Board, Arduino USB-A to USB-B Data Cable for UNO/MEGA, Through-Hole LED Pack (Pack of 10), Carbon Film Resistor 1/4W 5% (Pack of 10), Solderless Breadboard, Dupont Jumper Wires (40 pcs) and Arduino Sensor Shield V5 Expansion Board. On this page you can tick the parts you already have and add only the rest to your cart.
It is a beginner project and takes about 20 minutes. The build on this page has 6 steps.
No. This page has the complete, tested code (spark_kit_02_external_led_blink.ino).
About ₹427 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Wiring an LED with a current-limiting resistor; Which LED leg is the anode; Storing a pin number in a variable.
Warm, cool, rainbow or breathing: cycle lighting moods from your sofa.
Press to roll: the pips tumble and slow down before landing on a number.
Wait for the light, hit the button: how many milliseconds can you beat?
A bright 4-digit clock that keeps time through power cuts.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.