Remote-controlled RGB mood light
Warm, cool, rainbow or breathing: cycle lighting moods from your sofa.
Shop by category
Shop all componentsThe TM1637 module drives four 7-segment digits over just two wires, CLK and DIO. With the TM1637Display library, display.showNumberDec(n, true) shows any number up to 9999 with leading zeros. A counter that adds one every 100 ms is the simplest way to see it working.
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
Female-to-female or male-to-female leads for the modules
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_22_digital_counter.inoVerify & upload in Electrolark// Spark Kit 22: digital counter
#include <TM1637Display.h>
#define CLK 2
#define DIO 3
TM1637Display display(CLK, DIO);
int count = 0;
void setup() {
display.setBrightness(5); // 0..7
}
void loop() {
display.showNumberDec(count, true); // true = leading zeros
count++;
if (count > 9999) count = 0;
delay(100);
}
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.
Check CLK on D2 and DIO on D3 (not swapped), and that the library is installed.
Raise setBrightness() or check the module with another sketch: a dead segment is a hardware fault.
TM1637Display by Avishay Orpaz, from the Library Manager.
Yes: start at 9999 and subtract one each step.
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.
5 parts: Uno R3 CH340G ATmega328p Compatible Development Board, Arduino USB-A to USB-B Data Cable for UNO/MEGA, TM1637 4-Digit 7-Segment Display Module, 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 intermediate project and takes about 30 minutes. The build on this page has 4 steps.
About ₹440 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Driving a display with a library; Counting logic and wrap-around; Two-wire display interfaces.
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.