I keep seeing these neopixel rings and fancied a play with them. A clock then, but not just a clock, ambitiously I plan to add modes to do reading light, nightlight, alarm, temperature display and logging, show off display modes and more as I think of them.
Ultimately add wifi and have contextural music alarm clock. Blue Monday, ruby Tuesday, forever autumn, summer in the city, singing in the rain etc. waaaay done the line.
Gathered a box o bits:
2.6amp 5v power supply
Teensy 5v or Arduino diecimila (never used vs familiar)
12 led neopixel ring
24 led neopixel ring
Rtc board
Temp sensor
LDR
Piezo buzzer (tap input and tone feedback?)
4700uf capacitor (to smooth initial spike on power on)
Resistors
Chunky 2way switch (dunno might not need. Maybe lamp mode?)
Accelerometer/gyro. Probably overkill but maybe just for fun. Never used one and it was £3
Need some wire, time and patience. Expect progress to be glacial, it has taken 6 months to get to box of bits.
I had put off getting going with the RTC after reading about 'issues' others had had with the board I got. Eventually I just got on with it and was easier than expected.
Setting the time was hampered slightly by the realisation that the time is set at compile time and then transferred. There's probably a clever way to set it over serial, but I went for timing the compile and upload and compensating for that (19secs) It's accurate to within one second which will do for me.
Tidied up the clock code to try using one LED on the inner ring and two on the outer for the hour, so you get a triangle for the hour. For the minutes I've filled the outer ring proportionally. Looks ok but currently is only good for 2.5 mins accuracy.
I'm going to try fading up the next pixel which should allow a guess at the time within 30 secs to the trained eye. May try some other options
Maybe also add markers for 12,3,6,9
I will add a second blinker, I think a radial sweep looks really cool but may get a bit distracting in normal use.
Still to do is something interesting with the colours, alarm function, switch and a case.
I had put off getting going with the RTC after reading about 'issues' others had had with the board I got. Eventually I just got on with it and was easier than expected.
Setting the time was hampered slightly by the realisation that the time is set at compile time and then transferred. There's probably a clever way to set it over serial, but I went for timing the compile and upload and compensating for that (19secs) It's accurate to within one second which will do for me.
Tidied up the clock code to try using one LED on the inner ring and two on the outer for the hour, so you get a triangle for the hour. For the minutes I've filled the outer ring proportionally. Looks ok but currently is only good for 2.5 mins accuracy.
I'm going to try fading up the next pixel which should allow a guess at the time within 30 secs to the trained eye. May try some other options
Maybe also add markers for 12,3,6,9
I will add a second blinker, I think a radial sweep looks really cool but may get a bit distracting in normal use.
Still to do is something interesting with the colours, alarm function, switch and a case.
Added the temperature sensor and fiddled with that for an evening or two. Getting .1 degree celsius accuracy, calibrated against every other thermometer I could find.
Tonight I moved that off the breadboard and added temperature as a display mode. Sort of. For now it just turns red if reading is higher than last, green if same, blue if lower. Might be fun for long exposure thermal imaging but will have to come up with a more useful display.
Have dropped brightness to 1/32 of full power! Doesn't leave a lot of room for going dimmer.
Deciding how to actually display the time is quite tricky in itself. I have an inner ring with 12 leds and outer with 24, so maybe display hours on the inner ring and 2.5 min intervals on the outer? Hmm.
Thought about using wider 'hands' like using 3 pixels for the hour hand and fading brightness but it seems ambiguous and I want to be able to tell the time at a glance.
Haven't broken out the RTC yet, but was trying to approximate a 1 sec sweep around the outer ring. 1000/24 is 41.66 so I tried using that as a delay value - way too fast. Trial and error led me to a value of 80ms, I'm not sure why this works.
Evidently delay isn't suited to task unless you know how it takes to do everything else and I should look at millis() for more accuracy.
Not going to worry too much about this, more concerned with how to see if I'm getting useful anything from the RTC (Trinket has no Serial for debugging)
Had a few hours today, so did basic Hellos for the trinket, then 12 led ring running off usb power, then both rings running off external 5v. Initially forgot to connect ground to trinket and got unpredictable results rom the chained rings, once I'd done that, all is good.
They are super bright, like everyone says. Next tasks are to work out how to lower brightness, power trinket from same supply (currently usb), play with some ideas for displaying time and get the RTC hooked up.
Another mode to think about - fake TV holiday mode, for when you are away, a few hours of random colours to simulate a TV set.
I used the same RTC board on my #fixietube clock - unfortunately it runs away. I've already changed the oscillator, but it didn't help. Hope you have better luck with it!
I used the same RTC board on my #fixietube clock - unfortunately it runs away. I've already changed the oscillator, but it didn't help. Hope you have better luck with it!