Software question

I am just starting to learn sketch writing for Arduino. I wanted to write a sketch that would turn on 3 LED's one after the other and then all 3 at the same time. I can get the led's to light individually, however I can't get the 3 to light together. When I try to use digitalWrite to work all three together I get error codes about too many arguments. Can someone please tell me the proper procedure to get the three LED's to light simultaneously? Thanks!

//light all three leds
digitalWrite(led1,HIGH);
digitalWrite(led2,HIGH);
digitalWrite(led3,HIGH);
//voila! all three leds are on

:slight_smile:

Can someone please tell me the proper procedure to get the three LED's to light simultaneously?

While that code might look like the LEDs are being turned on separately, it happens so fast that it looks like they are all on at the same time.

Or, depending on how your LEDs are wired:

//light all three leds
digitalWrite(led1,LOW);
digitalWrite(led2,LOW);
digitalWrite(led3,LOW);
//voila! all three leds are on

:smiley: