Guest User

Untitled

a guest
Nov 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. int pinArray = new int[4][7]{
  2. {3, 5, 6, 9, 10, 11, 13},
  3. {A1, A2, A3, A4, A5, 4},
  4. {A0, 0, 1, 2},
  5. {7, 8, 12}
  6. };
  7.  
  8. int configArray = new int[3] [0, 0, 0];
  9.  
  10. void setup() {
  11. // setup pins
  12. for (int i = 0; i < 7; i++) {
  13. pinMode(pinArray[0][i], OUTPUT);
  14. } //Board 0 pins
  15.  
  16. for (int i = 0; i < 6; i++) {
  17. pinMode(pinArray[1][i], INPUT);
  18. } //Board 1 pins
  19.  
  20. pinMode(pinArray[2][0], INPUT);
  21. for (int i = 1; i < 4; i++) {
  22. pinMode(pinArray[2][i], OUTPUT);
  23. } //Board 2 pins
  24.  
  25. for (int i = 0; i < 3; i++) {
  26. pinMode(pinArray[3][i], INPUT);
  27. } //Board 3 pins
  28.  
  29.  
  30. }
  31.  
  32. void loop() {
  33. // put your main code here, to run repeatedly:
  34.  
  35. }
  36.  
  37. void randConfig() {
  38. // randomises the solutions to each board
  39. configArray[0] = floor(rand() * 3);
  40. configArray[1] = floor(rand() * 256);
  41. configArray[2] = floor(rand() * 3);
  42.  
  43. // setup lights to show configuration
  44. if ((configArray[0] + configArray[2])%2 !== 0) {
  45.  
  46. }
  47. }
Add Comment
Please, Sign In to add comment