Array Shifting: 4-Digit Text Scroller
A TM1637 4-digit display is designed to show "10:45". Forcing an 8-letter word like "HELLO YOU" to scroll across those 4 character limits is a masterclass in code iteration. The 4 Digit Display Text Scroller behaves like a miniature Times Square ticker tape!

Custom Hexadecimal Characters
A 7-segment display isn't a high-res screen; you have to draw characters using math.
- To make an "H", you turn on segments B, C, E, F, and G. In binary, this is
0b01110110(or0x76in Hex). - You create an array for the entire sentence:
uint8_t textArray[] = {0x76(H), 0x79(E), 0x38(L), 0x38(L), 0x3F(O)...};
The Shifting Magic (The Buffer)
You only have 4 physical screens.
- Frame 1: The display shows slots 0, 1, 2, 3 (
H E L L). - The Wait: A
delay(500)makes it readable. - The Increment: A
forloop variable shifts everything over by one. - Frame 2: The display now shows slots 1, 2, 3, 4 (
E L L O). - Frame 3:
L L O [space]. By continually shifting the "window" of the array we are looking at to the right, the eye sees a continuous, smooth scrolling animation across the limited hardware.
Parts Needed
- Arduino Uno/Nano.
- TM1637 or YSD-439AK2B 4-Digit 7-Segment Display Module: Ensure it is the module with the built-in backpack chip, not just a bare display which requires 12 massive jumper wires!
- A Breadboard.