Gonna include a Python example this time of what I want to have happen. I believe the solution will be fairly straightforward and clear now.
Previous question.
"How to alternate between 10 LEDs
Lighting say series1 (1,3,5,7,9)
and then turning off series1 and lighting series2 (2,4,6,8,10)
repeatedly?"
I have pin 4 to 13 mapped. Resistors and all, already made some code with help from the "For Dummies" book and playing around.
Python Code:
import time
delay = 0.5
constant = 1
stage = 1
LED1 = (4,6,8,10,12)
LED2 = (5,7,9,11,13)
while constant:
while stage is 1:
print(LED1)
stage = stage - 1
time.sleep(delay)
while not(stage):
print(LED2)
stage = stage + 1
time.sleep(delay)
#The Result:
(4, 6, 8, 10, 12)
(5, 7, 9, 11, 13)
(4, 6, 8, 10, 12)
(5, 7, 9, 11, 13)
(4, 6, 8, 10, 12)
(5, 7, 9, 11, 13)
All LEDs get set to HIGH each line simultaneously, obviously I still need to include a LOW line. But this is what I'm trying to figure out, the array.