Revenge of the Mouse

Dependencies:   4DGL-uLCD-SE EthernetInterface Game_Synchronizer LCD_fonts MMA8452 SDFileSystem mbed-rtos mbed wave_player

Fork of 2035_Tanks_Shell by ECE2035 Spring 2015 TA

Committer:
jford38
Date:
Wed Oct 07 00:43:25 2015 +0000
Revision:
1:0589ea36661b
Parent:
0:899c85cd266f
Child:
2:c358ad9aedc4
2-Player game via Ethernet. First try.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jford38 0:899c85cd266f 1 // THIS GUY LISTENS AND REPEATS. CLIENT. MASTER.
jford38 0:899c85cd266f 2 // (It doesn't make sense, I know.)
jford38 0:899c85cd266f 3
jford38 0:899c85cd266f 4 #include "mbed.h"
jford38 0:899c85cd266f 5 #include "two_player.h"
jford38 0:899c85cd266f 6
jford38 0:899c85cd266f 7
jford38 0:899c85cd266f 8 uLCD_2P uLCD(p28,p27,p26, PLAYER1); // serial tx, serial rx, reset pin;
jford38 0:899c85cd266f 9
jford38 0:899c85cd266f 10
jford38 0:899c85cd266f 11 int main (void) {
jford38 1:0589ea36661b 12 int* buttons;
jford38 1:0589ea36661b 13
jford38 1:0589ea36661b 14 pc.printf("\033[2J\033[0;0H");
jford38 0:899c85cd266f 15 pc.printf("I'm alive! Player 1\n");
jford38 0:899c85cd266f 16
jford38 0:899c85cd266f 17 uLCD.init();
jford38 0:899c85cd266f 18 pc.printf("Initialized...\n");
jford38 0:899c85cd266f 19 while(1) {
jford38 0:899c85cd266f 20 uLCD.background_color(BLUE);
jford38 0:899c85cd266f 21 uLCD.cls();
jford38 0:899c85cd266f 22 uLCD.update();
jford38 0:899c85cd266f 23 pc.printf("Updated. \n");
jford38 1:0589ea36661b 24 buttons = uLCD.get_button_state();
jford38 1:0589ea36661b 25 pc.printf("Button State: %x %x %x %x %x\n", buttons[0], buttons[1], buttons[2], buttons[3], buttons[4]);
jford38 1:0589ea36661b 26 wait(3);
jford38 1:0589ea36661b 27 //pc.printf("\033[2J\033[0;0H");
jford38 0:899c85cd266f 28 }
jford38 0:899c85cd266f 29 //
jford38 0:899c85cd266f 30 //uLCD.line(0,0,200,200,BLACK);
jford38 0:899c85cd266f 31 }