KBrat-SSD645-Midterm_Part2
Dependencies: MMA8451Q8g_Update SLCD mbed
Fork of KL46z_single_tap_2017 by
Diff: KL46z_single_tap_2016..cpp
- Revision:
- 12:4774c4fc718e
- Parent:
- 11:c842619c49a1
--- a/KL46z_single_tap_2016..cpp Mon Feb 22 16:56:38 2016 +0000 +++ b/KL46z_single_tap_2016..cpp Tue Mar 14 16:42:14 2017 +0000 @@ -2,7 +2,7 @@ #include "MMA8451Q8g.h" #include "SLCD.h" -#define BLINKTIME 0.2 +#define BLINKTIME 1.5 #define RELAYON 0 #define RELAYOFF 1 #define LEDDELAY 0.4 @@ -27,14 +27,14 @@ #define MAX_8G 0x02 #define SET_INTERRUPT 0x08 //using interrupt INT1 PTC5 #define SET_INT_LINE 0x08 -//#define SET_INTERRUPT 0x00 //using interrupt INT2 PTD1 -//#define SET_INT_LINE 0x00 #define SET_THZ 0x20 // See Table 49 in data sheet /*********** +0b0010 0000 2g/0.063g/count = 32 counts ************/ #define SET_TMLT 0x18 // See Talbe 51 in data sheet /****** +0b0001 1000 24 = 0x18 time step at 800Hz ODR = 0.625ms 24x0.625 = 15 ms @@ -56,7 +56,6 @@ Ticker ledBlink; // timinginterrupt for RED led InterruptIn MMA8451QInt1(PTC5); //push botton with internal pullup -//InterruptIn MMA8451QInt1(PTD1); DigitalOut myled(LED_RED); // red led DigitalOut relay(LED_GREEN); // green led