Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int pinArray = new int[4][7]{
- {3, 5, 6, 9, 10, 11, 13},
- {A1, A2, A3, A4, A5, 4},
- {A0, 0, 1, 2},
- {7, 8, 12}
- };
- int configArray = new int[3] [0, 0, 0];
- void setup() {
- // setup pins
- for (int i = 0; i < 7; i++) {
- pinMode(pinArray[0][i], OUTPUT);
- } //Board 0 pins
- for (int i = 0; i < 6; i++) {
- pinMode(pinArray[1][i], INPUT);
- } //Board 1 pins
- pinMode(pinArray[2][0], INPUT);
- for (int i = 1; i < 4; i++) {
- pinMode(pinArray[2][i], OUTPUT);
- } //Board 2 pins
- for (int i = 0; i < 3; i++) {
- pinMode(pinArray[3][i], INPUT);
- } //Board 3 pins
- }
- void loop() {
- // put your main code here, to run repeatedly:
- }
- void randConfig() {
- // randomises the solutions to each board
- configArray[0] = floor(rand() * 3);
- configArray[1] = floor(rand() * 256);
- configArray[2] = floor(rand() * 3);
- // setup lights to show configuration
- if ((configArray[0] + configArray[2])%2 !== 0) {
- }
- }
Add Comment
Please, Sign In to add comment