I am using maxin-rd/TM16xx library.
This is my test-code:
#include <TM1650.h>
#include <TM16xxDisplay.h>
// [data Pin]
// | [clock Pin]
// | | [num Digits]
// | | | [activate Display]
// | | | | [intensity]
// | | | | | [display mode]
// ↓ ↓ ↓ ↓ ↓ ↓
TM1650 display1(4, 5, 4, true, 0);
int n;
void setup() {
display1.clearDisplay();
}
void loop() {
for (n = 0; n < 9999; n++) {
display1.setDisplayToDecNumber(n, 0);
delay(300);
}
}
setDisplayToDecNumber() doesn't suppress leading zeros.
I have seen an example at this video that is using setDisplayToSignedDecNumber ().
display1.setDisplayToSignedDecNumber( n, // signed long number
B0000, // byte dots
false // boolean leadingZeros = true
); // const byte numberFont[] = TM16XX_NUMBER_FONT);
It seems like that instruction can suppress the leading zeros, but I get an error when I introduce that line.
Compilation error: 'class TM1650' has no member named 'setDisplayToSignedDecNumber'; did you mean 'setDisplayToDecNumber'?
That library does not contain that keyword. Is there other library that can suppress leading zeros?