NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » Blinking Leds
October 17, 2011 by nerdgirl |
Hello, I have completed the blinking led project as I have input code for three leds. PC4, PC3, and PC2. I could have input code for all 5 leds but found that three leds was plenty. Works great. Instead of having the leds all blink on/off at the same time, I wish to write code that will allow the three leds to blink one at a time continuously. Kinda like: 1,2,3 then repeat 1,2,3 etc. Would I use a "for" loop or a "while" loop, to accomplish this? |
---|---|
October 17, 2011 by dgikuljot |
With microcontrollers, you always want to use a while loop as the main loop. |
October 18, 2011 by Ralphxyz |
Nerdgirl, search the forum for "Knight Rider" to get a couple of led blink examples and discussions. Ralph |
October 18, 2011 by nerdgirl |
Thanks Ralph. I'll do that. :-) |
Please log in to post a reply.
Did you know that you can control 120 LEDs with just 17 microcontroller pins? Learn more...
|