Power Grid Board Game Timer. Acts like a chess timer for 3-6 people. Uses an ADXL accelerometer to pause the timer and change players. Uses an LCD screen to prompt the players for input, read that input, and change between rounds.
Dependencies: DmTouch_UniGraphic UniGraphic-forLdelaney17FinalProject mbed
Diff: acc.h
- Revision:
- 0:1abea3982908
- Child:
- 1:ba0f395e8c11
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/acc.h Wed Jan 25 00:07:44 2017 +0000 @@ -0,0 +1,17 @@ +#ifndef ACC_H +#define ACC_H + +#include "mbed.h" + +//Serial pc(USBTX,USBRX); +extern I2C connection; + +const int addr_acc = 0x53 << 1; + +//initializes based on a duration in ms, threshold in g, gap in ms and window in ms +void acc_init(float duration, float threshold, float gap, float window); + +//reads the interrupt source register and returns 1 if there was a single tap, or 2 if there was a double tap +char get_int_type(); + +#endif