baseline features - a little buggy

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Revision:
1:4421c1e849e9
Parent:
0:95264f964374
--- a/hardware.cpp	Mon Mar 29 21:17:26 2021 -0400
+++ b/hardware.cpp	Fri Apr 09 20:44:48 2021 +0000
@@ -4,6 +4,7 @@
 #include "globals.h"
 
 #include "hardware.h"
+#include "graphics.h"
 
 // We need to actually instantiate all of the globals (i.e. declare them once
 // without the extern keyword). That's what this file does!
@@ -24,7 +25,8 @@
 // Some hardware also needs to have functions called before it will set up
 // properly. Do that here.
 int hardware_init()
-{    
+{  
+    draw_start();
     // Initialize pushbuttons
     button1.mode(PullUp); 
     button2.mode(PullUp);
@@ -35,8 +37,12 @@
 // Implement this function.
 // HINT: lookup your accelerometer under mbed site > Hardware> Components
 // and look at demo code
-GameInputs read_inputs() 
+GameInputs read_inputs()
 {
     GameInputs in;
+    acc.readXYZGravity(&in.ax,&in.ay,&in.az);
+    in.b1 = !button1;
+    in.b2 = !button2;
+    in.b3 = !button3;
     return in;
 }