-
Notifications
You must be signed in to change notification settings - Fork 4
API mode
This mode consists of 8 functions and all these functions are described below.
In API mode device accept instructions which start with a combination of header byte (0x5E) and function byte (Fn).
Following Python sample demonstrate how to display number 6174 using low-level API mode instruction.
import serial
device = serial.Serial('/dev/ttyACM0')
if device.is_open:
device.write([94, 49, 54, 49, 55, 52, 0, 0, 0, 0, 0, 0])
device.close()
Python wrapper API for this mode is also available in here
Clear all 10 digits of the display module. This function does not require any additional parameters.
Function (Fn): 0x30
Update display of the module with the specified digit array.
Function (Fn): 0x31
M0 - M9: Character array to display on the module.
Change the system time of the display module.
Function (Fn): 0x32
H0: Hour in 24-hour format. Value of this byte must between 0 to 23.
M0: Minute. Value of this byte must between 0 to 59.
S0: Seconds. Value of this byte must between 0 to 59.
Change the system date of the display module. This function is not available in version 1.0 firmware due to the limitation of the STM32F103C series MCUs.
Function (Fn): 0x33
D0: Date. Value of this byte must between 1 to 31.
M0: Month. Value of this byte must between 1 to 12.
Y0: Year as two digits number. Value of this byte must between 0 to 99.
Switch module to the idle mode.
Function (Fn): 0x34
Configure message to display on the idle state.
Function (Fn): 0x35
M0 - M9: Character array to display on the idle state.
Configure idle mode.
Function (Fn): 0x36
V0: Idle mode value.
Mode (V0) | Description |
---|---|
0 | Clear display. (Maximum power-saving mode) |
1 | Display system time |
2 | Display system date |
3 | Display custom message |
Activate built-in buzzer.
Function (Fn): 0x37