Its a four directional traffic light system that turns on based on a pattern. I just started and everything was going well but in void loop, only cycleOne is looping, not cycleTwo. This is for my 10th grade summative so I just need clarity on what needs to be changed.
int thispin;
int lopin=2;
int hipin=13;
int n;
int e;
void setup()
{
for (thispin=lopin; thispin<=hipin; thispin++)
{pinMode (thispin, OUTPUT);
}}
void cycleOne()
{
int hipin=10;
for (int n=hipin; n>=hipin; n+0)
{ digitalWrite (n, HIGH);
delay (1000);
digitalWrite (n, LOW);
}}
void cycleTwo()
{
int hipin=12;
for (int e=hipin; e>=hipin; e+0)
{ digitalWrite (e, HIGH);
delay (1000);
}}
void loop()
{
cycleOne();
cycleTwo();
}
27 posts - 9 participants