Blinky Lights
rokicki
Posts: 1,000
Here's a quick challenge that everyone with a demo board should be able to participate in.
(Or even those without, if they are willing to wire up 8 LEDs.)
What's the coolest blinkinglights program you can write? Spin or assembly, doesn't matter.
Output is restricted to eight LEDs in a row. Consider this a minimal demoscene contest.
No prizes, no deadlines, just what can you do? Short and elegant is nice, but if you can
manage to convey a story with only eight LEDs, a long submission is fine too.
I'll probably write one tonight just to get the ball rolling.
(Or even those without, if they are willing to wire up 8 LEDs.)
What's the coolest blinkinglights program you can write? Spin or assembly, doesn't matter.
Output is restricted to eight LEDs in a row. Consider this a minimal demoscene contest.
No prizes, no deadlines, just what can you do? Short and elegant is nice, but if you can
manage to convey a story with only eight LEDs, a long submission is fine too.
I'll probably write one tonight just to get the ball rolling.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
While a cog per cell is inefficient, I guess it's truer to the spirit of CAs. It also opens up the possibility of asynchronous CAs, although other rules apply in that case.
Maybe the clock.spin module can be used for global synch.
Anyway, here's the code. I don't have a demo board, I just wired 8 leds. Perhaps someone can fix it. I think there's an issue with my arithmetic.
Ok, off to study. Won't be free until December 11th
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
links:
My band's website
Our album on the iTunes Music Store
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Graham
Anyway, the routine can be shorter if the LEDs are wired as I had planned, but you get the point and rearranging the code for a different wiring scheme is left as an exercise for the reader ;-)
I hope it's farily explanatory from looking at the code because there's not a lot of comments as I recall .. I was developing at warp 9...
Here's an example of the routine in operation:
Oh, and shhhhh .... don't tell anyone I used a cog just to blink LEDs !!!
73,
Steve
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Steve, N5AC