I expect that there's is some pretty impressive programming behind that clock.
I'm even impressed with him driving 32 RGB leds simultaneously, and that's even before you consider the coordinate system conversion.
Theres lots of information on google for converting Cartesian coordinates to Polar ones, and i'm sure you could implement an algorithm in PBP but i'm not sure if you could do it fast enough.
The video says he is using a ATMEGA644 running at 20MHz but doesn't mention a programming language. He may be using plain old assembly which would make it fast, but quite a pain to program and troubleshoot.
While I was typing this I had an idea - you could do all of the coordinate conversions beforehand and use a look-up table for each "pixel". So instead of doing the maths for each pixel each time, you just use the lookup table for each pixel to determine its location in the sweep. This way you could look up the pixels via the lookup table in real time as the propeller swings instead of having to calculate the whole "frame".
I hope all of that made sense
*edit* Out of curiosity, how many "pixels" did you use in each rotation of your clock shown in the picture? I.e. i want to work out how many degrees between each "pixel".
Last edited by Kamikaze47; - 15th September 2009 at 17:54.
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Bookmarks