TM16xx icon indicating copy to clipboard operation
TM16xx copied to clipboard

Request: Function to flip 7-segment display

Open ngmacha opened this issue 2 years ago • 3 comments

Hello, is it possible to add a fuction that flips the TM1637-based 7-segment 4-digit display, so the numbers (time) are showing as rotated 180 degrees? I'm building a timer that can be used/mounted in 2 positions, and would like to flip the display based on the value of the accelerometer's Z orientation. Thank you.

ngmacha avatar May 07 '22 19:05 ngmacha

Interesting concept - I'm sure this can be implemented, perhaps by adding an alternative font or by doing some bit-magic. I should have a GY-521 MPU-6050 accelerometer somewhere in my box of modules, but I haven't played with it yet.

A few years back I made an ESP8266 (d!-mini) driven 3-wheel robot, for which such a feature could be handy. It features a TM1637 display and some other things (buzzer, joystick, RGB-led, I/O expander, I2C ports, etc). I published a video about making it on my YouTube channel.

I'm short on time so I don't know when I get to this, but I've marked this as an enhancement and I won't close it before I looked into it. In the mean while feel free to dive into the code of the library to see if there's an easy way to handle this...

maxint-rd avatar May 11 '22 06:05 maxint-rd

Hi @maxint-rd ! I've posted same request into several other TM11637 library repos, and got a great response from @jasoncox at https://github.com/jasonacox/TM1637TinyDisplay/issues/2 As matter of fact, he just implemented a flip function yesterday and I've tested it to work perfectly for my case. You may check with him to implement the same for your library. Thank you for replying, and kind regards - Mac Ha

ngmacha avatar May 11 '22 06:05 ngmacha

Cool, thank you for your swift reply and for informing me about Jason's work. I didn't know his library and it may give me some inspiration to further improve mine. Good luck with your project and have fun!

maxint-rd avatar May 11 '22 07:05 maxint-rd