I am using for loops to flash two series of LEDs in an alternating pattern. I uploaded my code and for some reason it is not looping through each for loop as many times as I have it set to. It only loops through the whole void loop()… I have attached a copy of the code I wrote for this. I’m a newbie at for loops so does anyone see any errors or things to fix???
//declare all pins
const int led2 = 2;
const int led3 = 3;
const int led4 = 4;
const int led5 = 5;
const int led6 = 6;
const int led7 = 7;
const int led8 = 8;
const int led9 = 9;
const int led10 = 10;
const int led11 = 11;
int t1=35;
int t2=50;
int t3=75;
int t4=100;
int t5=200;
BulldogLowell:
the loop() function will repeat over and over again.
if you want to do just the 6 flashes, you can put it in a function and call it from Setup like this. The setup() function runs only once.
//declare all pins
const int led2 = 2;
const int led3 = 3;
const int led4 = 4;
const int led5 = 5;
const int led6 = 6;
const int led7 = 7;
const int led8 = 8;
const int led9 = 9;
const int led10 = 10;
const int led11 = 11;
int t1=35;
int t2=50;
int t3=75;
int t4=100;
int t5=200;
jodyboehs:
I am using for loops to flash two series of LEDs in an alternating pattern. I uploaded my code and for some reason it is not looping through each for loop as many times as I have it set to. It only loops through the whole void loop()...... I have attached a copy of the code I wrote for this. I'm a newbie at for loops so does anyone see any errors or things to fix????