AKJ7 / TM1637

TM1637 Library Driver for Microcontrollers
GNU General Public License v3.0
33 stars 11 forks source link

6 Digits 7 Segments #5

Closed PetitMalin closed 4 years ago

PetitMalin commented 4 years ago

Hi, First great job for your work +1

I try your library by changing the line: static constexpr uint8_t TOTAL_DIGITS = 4; by static constexpr uint8_t TOTAL_DIGITS = 6; It works to have the six digits but with the robotdyn 6 Digits 7 Segments, it's inverted... (https://robotdyn.com/6-digit-led-display-tube-7-segments-74hc595-green.html)

Like you want to display 123456 he give's 321654

Is there a solution to change or add a command, to resolve this problem ? Try on a Arduino Uno,Nano ang Mega2560 same results

Thank's in advice

AKJ7 commented 4 years ago

It seems like the display you are using is just two 3 segment-displays combined. This explains why displaying 123456 yields 312 654. I would like to change the library but honestly your problem apply to only a small percentage of users, that i can't solve this without affecting others.

You could do something create a class that inherits from the TM1637 class and overwrites the sendToDisplay() function to reverse the order of the numbers's digits for the display's digits above 3.

Have a nice day.

AKJ7 commented 4 years ago

Or just use another library. I might add an option to change Display types in the future.