Well, from the other efforts I decided to make one myself.
It is not 100%, but close enough.
It uses a 1307 RTC chip. ADA FRUIT Neo Pixel ring/s. I have gone for the biggest size (60) for simplicity.
But it can be changed easily with the variable "LED_Loop".
It should work ok with other sizes.
There is a small bug when the minute hand gets to 12 o'clock.
Yes I have also knocked up a clock using the 60 LED ring but need a frame to mount the ring in/on. I'm looking for a local person with a wood lathe or CNC mill/router to make one but it's not as easy as I thought it would be so am holding out hope for the Sandringham Country Fair next week as they tend to have artisans who do this sort of thing.
I'm at work all weekend so wont get a chance to test your code but have attached the code I'm currently working with. I use a different RTC to you though.
I add the number of pixels in the chain (60) to all the values of hour, minute & second and use modulo to bring them into correct range for output after applying and maths needed.
For example the hour hand is 5 pixels wide (hour pixel plus 2 either side) and when it is at the top of the hour (pixel 0) the other pixels would be at -2, -1, +1 & +2 but adding pixel count first makes them 58, 59, 61 & 62 instead. now apply modulo 60 and the pixel numbers become 58, 59, 1 & 2 as is needed for the library. Sorry if you now feel like your sucking on an egg
I wasn't telling you how to suck eggs, rather there was a trap which had me stuck for a while.
Sorry but you misread my reply, I was saying sorry if you feel like your sucking on an egg with me prattling on about mod etc. :~
OK, so you make your hour hand have two LEDs either side. What happens when the second hand or minute hand "overlap"?
The hour hand is 5 leds wide in total, the minutes hand is 3 leds and the seconds 1 led. The minutes overlap the hours and the seconds is mixed over both with cross fading between pixels as it moves.
I just realized I may have posted a newer test version than the one I'm describing. I will have to load it up and test when I'm next at home (5 days).
Today I am going to look for something to house the clock/ring to make it look nice.
Good luck with that, the code I posted was written on 2nd July 2014 and I still don't have a case.
I used a DS3231RTC (more accurate I've found than the 1307's) and a 1 meter strip of WS2812B's, and wrapped itaround a 12" foam board I cut in a circle. Then used two more pieces of foam board to sandwich the LEDs so you can't see them from the front.
The reason I tried foam board is one, cost and secondly, easy stuff to work with, last, I wanted to see what the LED reflection off the foam board would be like. So that's the direction I went first. A white backplane for the LED's to reflect off works very nicely.
I use green for seconds, blue for hours and magenta for minutes. I also mounted an LDR behind the lower hole in the surf sign so that when the room lights dim, the clock drops to a "night time" brightness.
I'm going to make a proper wood frame out of dowels to finish it off.
Firstly this is my first post and I apologise for reactivating this thread but I must say I do like this sketch but I have a small issue and as I am a noob with Arduino coding I wanted to ask for some help.
I recently got a cheap 60 WS2812 LED ring but I have found the DIN goes the opposite direction compared to Adafruit's Neopixel 60 LED ring. Is there anyway of getting this code to work in reverse so instead of the code going clockwise it could go counter-clockwise so that I could get to use this sketch with my ring?
You're sending out 180 bytes of data to load the WS2812s, yes? So flip the order you send them out.
They are likely stored in an array. Go thru the array from 179 to 0 vs 0 to 179.
CrossRoads:
You're sending out 180 bytes of data to load the WS2812s, yes? So flip the order you send them out.
They are likely stored in an array. Go thru the array from 179 to 0 vs 0 to 179.
I understand but I really have not got a clue on where to make those adjustments in this sketch
Gavincol78:
I recently got a cheap 60 WS2812 LED ring but I have found the DIN goes the opposite direction compared to Adafruit's Neopixel 60 LED ring. Is there anyway of getting this code to work in reverse so instead of the code going clockwise it could go counter-clockwise so that I could get to use this sketch with my ring?
Wow, I must be getting old as I had completely forgotten about this thread. I never did post the finished clock code and pictures.
When you say 'the code' whose code are you referring to. If it's my code then maybe just altering three lines
int h = RTC.getHours() + TDC + PixelCount - 1; // Add PixelCount and TDC so wrapping backwards does not screw mod command
int m = RTC.getMinutes() + TDC + PixelCount;
int s = RTC.getSeconds() + TDC + PixelCount + 1; // +1 so minute hand does not move until second == 1 instead of normal second == zero
to
int h = TDC + PixelCount - RTC.getHours() - 1; // Add PixelCount and TDC so wrapping backwards does not screw mod command
int m = TDC + PixelCount - RTC.getMinutes();
int s = TDC + PixelCount - RTC.getSeconds() - 1; // -1 so minute hand does not move until second == 1 instead of normal second == zero
will do the job. I say maybe because I don't have the clock here to test it.