Thursday, February 17, 2011

Thing a Day 16: Arduino and LED Ticker


Scrolling LEDs. That's all, really.

No, of course it isn't. I wouldn't leave you with just that. What's going on here is that I have an Arduino generating a random number (0 or 1,) and then it's feeding that number to the shift register on the breadboard. Throw in some signalling so the shift register knows when to look for that number, and the shift register then proceeds to light up an LED for a 1 and turn off an LED for a 0. Do it again and the light pattern shifts to the left to make room. Hence, shift register!

The ultimate question: Why? Well, if you notice, I've got the sequence ticking from right to left -- just like it would if I had lots of LEDs wired up to display a message.

No comments:

Post a Comment