Remote-controlled RGB mood light
Warm, cool, rainbow or breathing: cycle lighting moods from your sofa.
Shop by category
Shop all componentsA 128x64 graphic LCD (ST7920) can draw large digits that are readable across a room. The Uno talks to it over three wires in serial mode with the U8g2 library. Two buttons step the token forward or back, and a buzzer chimes. A DWIN or Nextion touch screen, or a receipt printer for tokens, can be added later.
Mount the display and wires so people cannot pull them at the counter.
Tick anything you already have and the total updates.
Push buttons for Next and Back
Contrast adjustment (if your board has no trimmer)
128x64 ST7565 graphic LCD, a thinner alternative
58 mm receipt printer for paper tokens; check its interface before connecting
Follow the colours: red is power, dark grey is ground, blue is a signal.
queue_display.inoVerify & upload in Electrolark#include <U8g2lib.h>
U8G2_ST7920_128X64_F_SW_SPI lcd(U8G2_R0, 13, 11, 10, U8X8_PIN_NONE); // clock, data, CS
const int NEXT = 2, BACK = 3, BUZ = 8;
int token = 1;
void show() {
lcd.clearBuffer();
lcd.setFont(u8g2_font_6x12_tr);
lcd.drawStr(28, 10, "NOW SERVING");
lcd.setFont(u8g2_font_logisoso42_tn);
char s[5]; sprintf(s, "%d", token);
int w = lcd.getStrWidth(s);
lcd.drawStr((128 - w) / 2, 60, s);
lcd.sendBuffer();
}
void chime() { tone(BUZ, 880, 150); delay(180); tone(BUZ, 660, 250); }
void setup() {
pinMode(NEXT, INPUT_PULLUP); pinMode(BACK, INPUT_PULLUP);
lcd.begin();
show();
}
void loop() {
if (digitalRead(NEXT) == LOW) { token = token % 999 + 1; show(); chime(); while (digitalRead(NEXT) == LOW) delay(10); delay(50); }
if (digitalRead(BACK) == LOW && token > 1) { token--; show(); while (digitalRead(BACK) == LOW) delay(10); delay(50); }
}
The sketch above runs here on a simulated Arduino Uno. Move the sliders for the sensors and buttons it reads, and watch the Serial monitor, display and outputs change.
Turn the contrast trimmer slowly through its whole range; check PSB is tied to GND.
Keep the data wires short and add a 100 nF capacitor across VDD and VSS.
The button bounces; the code waits for release, so check the button is wired to GND, not 5 V.
Not as is: it uses a parallel bus. U8g2 supports it with a different constructor and more wires.
Yes, with an extra pair of buttons and a counter number on screen.
Add a DFPlayer Mini with recorded numbers for a spoken call.
13 parts: Uno R3 CH340G ATmega328p Compatible Development Board, 128×64 Graphic LCD (ST7920 / KS0108), 2 × DFRobot Gravity Digital Push Button Green – 3.3V/5V Digital Interface, Passive Piezo Buzzer, 5V, 16mm Rotary Potentiometer (Linear), 128x64 FSTN Graphic LCD Module (ST7565R), Nokia 5110 LCD Module (84x48), DWIN 3.5" HMI Smart Display, Nextion HMI Touch Display, Elecrow CrowPanel ESP32 HMI Display, plus 3 more. 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 2 hours. The build on this page has 5 steps.
Yes. The Run it panel under the code runs this exact sketch on a simulated board. Move the sliders or press the buttons for the sensors it reads, and the Serial monitor, display and outputs react as they will on the real build. It is a simulation, so real readings depend on your parts and wiring.
About ₹9,029 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Driving an ST7920 graphic LCD in serial mode; Big fonts with U8g2; Debouncing buttons.
Mount the display and wires so people cannot pull them at the counter.
Ideas that reuse this build: Conveyor box counter. They are listed under Take it further on this page.
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.
Learning project. Check every circuit and the datasheet of each part before you power it up.
A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.