Thanks for sharing this project. I really like the look of your screen layout. The 7-segment font looks great. Your post is very timely for me - I’m also working on an alarm clock, using very similar hardware. Eventually I’ll document this project on Hackaday IO and github.
Can you share your source for the 7-segment font? I am currently using a roboto mono font, but your clock face looks much better. I’d like to investigate using this font. I’ll be sure to credit your project if I make this change.
I also use a rotary encoder. I wrote a MicroPython encoder driver that is available on github. Quite a few people have used it in their ESP32 and ESP8266 projects. It uses an interrupt based implementation to detect encoder ticks. The github repo describes the technical approach and has examples. I don’t know if it would be useful for your clock or not?
Thanks for the link to your rotary encoder sources! It will save a lot of my time
My polling or timer interrupt approach fails when TFT-display update is run by LittlevGL…
Hint: 7-segment-display range of fonts I implemented is:
0x20,0x28-0x29,0x2E,0x30-0x39,0x3A,0x41,0x43,0x45-0x46,0x48,0x4A,0x4C,0x50,0x55,0x62-0x64,0x68,0x6E-0x6F,0x72,0x74-0x75
Space ( ) . 0…9 : A C E F H J L P U b c d h n o r t u
Hello Mike,
worked at the rotary encoder sources. You’re right, the way you did it it performs much better. Adapted it to ALPS EC11 style encoder.
See: Example for working with a rotary encoder?