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

Committer:
ldelaney17
Date:
Wed Jan 25 16:30:13 2017 +0000
Revision:
5:e07903df9510
Parent:
1:ba0f395e8c11
publish commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ldelaney17 0:1abea3982908 1 #ifndef ACC_H
ldelaney17 0:1abea3982908 2 #define ACC_H
ldelaney17 0:1abea3982908 3
ldelaney17 0:1abea3982908 4 #include "mbed.h"
ldelaney17 0:1abea3982908 5
ldelaney17 0:1abea3982908 6 extern I2C connection;
ldelaney17 1:ba0f395e8c11 7 //extern Serial pc;
ldelaney17 0:1abea3982908 8 const int addr_acc = 0x53 << 1;
ldelaney17 0:1abea3982908 9
ldelaney17 0:1abea3982908 10 //initializes based on a duration in ms, threshold in g, gap in ms and window in ms
ldelaney17 0:1abea3982908 11 void acc_init(float duration, float threshold, float gap, float window);
ldelaney17 0:1abea3982908 12
ldelaney17 0:1abea3982908 13 //reads the interrupt source register and returns 1 if there was a single tap, or 2 if there was a double tap
ldelaney17 0:1abea3982908 14 char get_int_type();
ldelaney17 0:1abea3982908 15
ldelaney17 0:1abea3982908 16 #endif