Created
September 4, 2018 10:53
-
-
Save PreetSangha/f6272837fb49d36ae05e55603f82cb7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
const int NUMBOARDS = 6; | |
int address[NUMBOARDS] = {0x21, 0z22, 0x23 ....} | |
PCF857 board[NUMBOARDS] = { | |
PCF857(address[0]), | |
PCF857(address[1]), | |
PCF857(address[2]), | |
PCF857(address[3]), | |
PCF857(address[4]), | |
PCF857(address[5]) | |
}; | |
void setup() { | |
} | |
void loop(){ | |
// addressing each | |
for(int i = 0; i< NUMBOARDS; ++i) { | |
... board[i] ... // lets you get each board | |
... address[i] ... // lets you get each address | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment