Undertale

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Revision:
3:ab8f2b4b44b0
Parent:
2:3caab2cc0476
--- a/hardware.cpp	Thu Apr 11 18:13:32 2019 +0000
+++ b/hardware.cpp	Sat Apr 13 21:11:27 2019 +0000
@@ -16,6 +16,7 @@
 DigitalIn button1(p21);                 // Pushbuttons (pin)
 DigitalIn button2(p22);
 DigitalIn button3(p23);
+DigitalIn button4(p24);
 AnalogOut DACout(p18);                  // Speaker (pin)
 PwmOut speaker(p26);
 wave_player waver(&DACout);
@@ -32,6 +33,7 @@
     button1.mode(PullUp); 
     button2.mode(PullUp);
     button3.mode(PullUp);
+    button3.mode(PullUp);
     acc.activate();
     return ERROR_NONE;
 }
@@ -43,6 +45,7 @@
     in.b1 = button1; // top button
     in.b2 = button2; // second button 
     in.b3 = button3; // third button
+    in.b4 = button4; // fourth, run button
     acc.readXGravity(&in.ax); // x axis acce
     acc.readYGravity(&in.ay); // y axis acce
     acc.readZGravity(&in.az); // z axis acce