I know this has been done before with MSP430, Arduino, and Raspberry Pi but I thought I would make one too. The one thing I wanted to do differently with mine is have a sweep second hand instead of a step second hand. It is still a work in progress. But here is what I have used to make this work:
The PWM range is 0-65500 and using some math I divided that value by 60 to get 1091.6667 repeating. The libraries from Adafruit only accept whole values so I convert that to int(1091.6667). That’s for each second with a time.sleep(1). Then it is just a simple matter of dividing it down by half until I get a smooth sweep of the seconds.
After 59 seconds have elapsed, the seconds, minutes, and hours hands are updated to the current time to keep everything in sync.
I am waiting for custom faces to be printed and a nice box to be made. Then I will post some pictures and share the code.