Table of Contents

IsegDecimal()

IsegDecimal() displays an integer in decimal format.

IsegDecimal command operation flow

bool IsegDecimal(int32_t number, bool leadingZero = false, uint8_t dotPosition = 0, uint8_t length = 4, uint8_t position = 0, uint8_t device = 0)

Commands

Command Arguments Return Value Operation
IsegDecimal(number, leadingZero, dotPosition, length, position, device) int32_t number — Decimal or hexadecimal value to display
bool leadingZero = falsetrue: leading zeros, false: leading spaces
uint8_t dotPosition = 0 — Decimal point position. 0 means none; 1~length selects the digit from the left
uint8_t length = 4 — Number of digits to write 1~4
uint8_t position = 0 — Start position 0~3; the leftmost digit is 0
uint8_t device = 0 — FND device number 0~6, defaults to 0
bool Displays an integer in decimal format.

Example

void setup() {
  IsegBegin(14, 15, 100, 0);  // Set the CLK/DIO pins and device number of the TM1637 FND.
  IsegBegin(130, 131, 100, 1);  // MPAINO K/K2 GPIO channels 0, 1
  IsegBrightness(7, true, 0);  // Set display brightness and on/off state.
  IsegBrightness(4, true, 1);  // Set display brightness and on/off state.
}
 
void loop() {
  IsegDecimal(1234, false, 0, 4, 0, 0);  // Display an integer in decimal format.
  IsegHex(0xABCD, false, 0, 4, 0, 1);  // Display an integer in hexadecimal format.
}

Precautions

Built-in Commands in the Same Category

← Built-in Command List