Easy question's


hi all.

1. how 24 led turn on 1 command? (led1 output 30, led2 output 31, ... led24 output 53)

2. how using 555 timer + shift register (5 led) (led1 on led off, led2 on led off, ... , led5 on led off) (not arduino)

thank yuo.

1) connected 24 outputs? (aka, use mega?)
put led pins in array , loop on it
code: [select]

const byte ledpins[] = {30, 31, 53}; //etc

void setallleds(bool state){
  for(byte = 0; < sizeof(ledpins); i++){
    digitalwrite(ledpins[i], state);
  }
}

inline void turnonallleds(){
  setallleds(high);
}

inline void turnoffallleds(){
  setallleds(low);
}


2) no idea mean there...


Arduino Forum > Using Arduino > Programming Questions > Easy question's


arduino

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor