Pages: [1]   Go Down
Author Topic: LED code  (Read 909 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Who you gonna call?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

when writing down code to turn on multiple LEDs before i write down
Code:
(4,,5,6,7,3,8 HIGH)]
before i write that down do i write
Code:
;digitalWrite
or do i write something else
« Last Edit: October 24, 2013, 05:12:21 pm by Ghostbusters » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 203
Posts: 8722
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

digitalWrite(pin, HIGH); can only turn on one pin.  You need a separate call for each pin:
Code:
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
digitalWrite(6 HIGH);
digitalWrite(7, HIGH);
digitalWrite(3, HIGH);
digitalWrite(8, HIGH);

The program will run so fast you won't be able to see that the first one lit a few microseconds before the last one.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 25
Who you gonna call?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks alot
Logged

Pages: [1]   Go Up
Jump to: