//include #include "LedControl.h" //LedControl lc2=LedControl(11,13,10,1); to deutero screen LedControl lc=LedControl(11,13,10,2); int b1 = 3; //rock int b2 = 4; //paper int b3 = 5; //scissors int v1,v2,v3; int x = random(0,3); int led_w[6] = {7, 6, 2, 12, 9, 8}; boolean locked_1 = false; boolean locked_2 = false; boolean locked_3 = false; byte r[8] = {B00000000,B00000000,B00111000,B00100100,B00111000,B00101000,B00100100,B00000000}; byte p[8] = {B00000000,B00000000,B00111000,B00100100,B00111000,B00100000,B00100000,B00000000}; byte s[8] = {B00000000,B00000000,B00011100,B00100000,B00011000,B00000100,B00111000,B00000000}; byte comp[4][8] = { {B00000000,B00000000,B00111000,B00100100,B00111000,B00101000,B00100100,B00000000}, {B00000000,B00000000,B00111000,B00100100,B00111000,B00100000,B00100000,B00000000}, {B00000000,B00000000,B00011100,B00100000,B00011000,B00000100,B00111000,B00000000}, {B00000000,B00000000,B00110000,B00101000,B00100100,B00101000,B00110000,B00000000} }; byte human[4][8] = { {B00000000,B00000000,B00111000,B00100100,B00111000,B00101000,B00100100,B00000000}, {B00000000,B00000000,B00111000,B00100100,B00111000,B00100000,B00100000,B00000000}, {B00000000,B00000000,B00011100,B00100000,B00011000,B00000100,B00111000,B00000000}, {B00000000,B00000000,B00110000,B00101000,B00100100,B00101000,B00110000,B00000000} }; char logic[3][3] ={ {'x','b','h'}, {'h','x','b'}, {'b','h','x'} };//Row = human, Column = Bot int pick_logic[3][3] = { {random(0,3),0,2}, {0,random(0,3),1}, {2,1, random(0,3)} }; int score_h,score_b; void setup() { Serial.begin(9600); for(int i = 0; i < 6; i++){ pinMode(led_w[i],OUTPUT); } //we have already set the number of devices when we created the LedControl int devices=lc.getDeviceCount(); //we have to init all devices in a loop for(int address=0;address