Reference
Last revision 2026/01/08
Library
Library files for Arduino: Library File and Example.
Installation guide: How to install a library?
Communication Protocol Description
IIC Communication
The data of microprocessor communicate with the LED driver control IC via two-line bus interface. During data input, DIN signal must keep unchanged when CLK is at high level. Only when CLK clock signal is at low level can DIN signal be changed. The condition of starting data input is that DIN changes from high to low when CLK is at high level, and its condition of ending is that DIN changes from low to high when CLK is at high level.
The operation of writing LED display data shall follow the principle of “from low bit to high bit” of display address and “from low bit to high bit” of data byte.
Slave Address
The slave address of the LED display is 0x48.
Display Register Address
| REG0 | REG1 | REG2 | REG3 |
|---|---|---|---|
| 68H | 6AH | 6CH | 6EH |
API Description
-
Constructor:
DFRobot_LedDisplayModule LED(&Wire, 0x48)
Initializes the module with the default IIC address (0x48) for 4-digit displays. -
Initialization:
LED.begin(LED.e4Bit)
Initializes the module for 4-bit display. Returns 0 if successful. -
Set Display Area:
LED.setDisplayArea(1,2,3,4)
Configures the display to use digits 1–4. Resend display values if the area is changed. -
Print Characters:
LED.print("H","A","L","O")
Displays characters on the 4-digit display. Supports numbers 0–9, capital letters (A, B, C, D, E, F, H, L, O, P, U), dash (-), and decimal-point suffixes (e.g., "H."). -
Print Variable:
LED.print(val)
Displays integer/decimal values (compatible with sensor outputs like temperature/humidity).
Was this article helpful?
