I have bought a 6 digit display (normally they have at most 4 digits).
I wonder if there is a library which can handle 6 digits (without doing hacks)?
Here is the link: https://www.aliexpress.com/item/32797225659.html
I have bought a 6 digit display (normally they have at most 4 digits).
I wonder if there is a library which can handle 6 digits (without doing hacks)?
Here is the link: https://www.aliexpress.com/item/32797225659.html
Most TM1637 libraries seem to assume a 4-digit display and use the unused two digits to light a colon or similar.
The arduino-tm1637/SevenSegmentTM1637.h at master · bremme/arduino-tm1637 · GitHub file has
// SevenSegmentTM1637 low level methods (use when you know what you're doing)
/* Prints raw (encoded) bytes to the display
* A
* ___
* * F | | B
* X -G-
* * E | | C
* ___
* D
* Bit: 76543210
* Segment: XGFEDCBA
*
* For example to print an H, you would set bits BCEFG, this gives B01110110 in binary or 118 in decimal or 0x76 in HEX.
* Bit 7 (X) only applies to the second digit and sets the colon
*/
/* Print raw (binary encodes) bytes to the display
@param [in] rawBytes Array of raw bytes
@param [in] length optional: length to print to display
@param [in] position optional: Start position
*/
void printRaw(const uint8_t* rawBytes, size_t length = 4, uint8_t position = 0);
/* Print raw (binary encodes) bytes to the display
@param [in] rawByte Raw byte
@param [in] position optional: Start position
*/
void printRaw(uint8_t rawByte, uint8_t position);
/* Write command to IC TM1637
@param [in] cmd command to send
@return acknowledged? command was (successful) acknowledged
*/
So it is up to you to write regular 7-segment values to digits 5, 6.
The TM1638 is intended for 8 digit + two colons
The TM1637 is intended for 6 digit. (or 4-digit + two colons)
David.