Set TM1637 Display clock via rotary encoder without interrupts

Just admit it, we all like to make clocks (well, people who found this blogpost via Google often do). One of the simplest clock to make is an Arduino based clock with a 7-segments display.

Not going into details (at least not in this post, perhaps I'll make an Instructable for this clock), but for this clock you need an Arduino, a DS3231 real-time clock module, a 7-segments display and a rotary encoder. As you probably guessed from the title, I'm using a TM1637 based display.

All parts are very cheap and can be easily obtained via eBay.

There are many tutorials/blogs/instructables explaining how to make an Arduino clock based on a DS3231 and a TM1637 display. And then I wanted to set the time via a rotary encoder. Simply click, set the hours by turning, click again, set the minutes by turning, click again and done. That's a rather simple method to set the time and I'd wish many of my clocks had that feature (in my car, the microwave, alarm clock, etc.).
This page really helped: http://www.buxtronix.net/2011/10/rotary-encoders-done-properly.html
Here you can read, how to simply use a rotary encoder on an Arduino.

And this was the result after an evening programming:

Comments

Popular posts from this blog

A round word clock (sort of)

Binoctular LED clock

A round word clock (part 2)