Hi guys. First post on the forums 8)… Basically i have an array of LED’s that some are set to HIGH and LOW. need to go through the Array to check the state of them i guess its something like this - >
int ledPins[] = { 4,5,6,7,8,9,10,11 };
for( int k =0; k< 8; k++ ){
if(LEDarray[k] == digitalRead(HIGH)){
Serial.print("0");
}
int ledPins[] = { 4,5,6,7,8,9,10,11 };
int amountLeds = 8;
for( int k =0; k< 8; k++ ){
if(LEDarray[k] == digitalRead(HIGH)){
Serial.print("0");
}
Nope.
int amountLeds = 8;
int ledPins[amountLeds] = { 4,5,6,7,8,9,10,11 };
for( int k = 0; k < amountLeds; k++ )
{
if ( digitalRead(ledPins[k]) == HIGH )
{
Serial.print('0');
}
}