// ARDUINO // Author: William L // // Purpose: // A custom serial communication for Ryersons MECHBOT and EVShield. The Mechbot was made // such that only 2 pins on both Arduinos are available for communication. On the // Mechbot, only pins PC4 and PC5 are available and on the EVShield only PB1 and PB0 are // available. // // L.PB1 OUTPUT --> A.PC4 Input // L.PB0 INPUT <-- A.PC5 Output // #int Lego_Out = PB1; // #int Lego_In = PB0; // // // CODE APPENDIX // // 10010 Pick up object on left side // 10100 pick up object on right side // 11000 blink EVShield // 10110 drop object #include #include #include #include //GLOBAL DECLARATIONS int data[5]={0,0,0,0,0}; int count = 0; int LED1 =PB0; int LED2 =PB1; int BUT1 = PD3; int BUT2 = PD4; int BUT3 = PD5; int ard_In = PC4; int ard_Out = PC5; //---------------------------------FUNCTION Completion_SCAN-------------------- int completion_Scan (void){ while ((PINC & (1<