diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2014-05-06 17:11:12 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2014-05-06 17:11:12 +0200 |
commit | d2de0612123d278f743320a3832d4e1263a782c7 (patch) | |
tree | 2ec1aed4294be20c26f21426c35c0561e0bd5cd7 /main.c | |
parent | e9601a5adada7e6abe80f5d711a8adefc894dfeb (diff) | |
download | hourglass-d2de0612123d278f743320a3832d4e1263a782c7.tar.gz hourglass-d2de0612123d278f743320a3832d4e1263a782c7.tar.bz2 hourglass-d2de0612123d278f743320a3832d4e1263a782c7.zip |
accel: Add horizon/shake detection
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -60,9 +60,11 @@ int main () { gyroStart (); accelStart (); +#if 0 speakerStart (); _delay_ms (200); speakerStop (); +#endif timerStart (); bool checkGyro = false; @@ -81,7 +83,9 @@ int main () { sleep_cpu (); sleep_disable (); } - printf ("ticks=%i\n", gyroGetZTicks ()); + + printf ("t=%i, h=%i, s=%i\n", gyroGetZTicks (), accelGetHorizon (), + accelGetShakeCount ()); #if 0 volatile const int32_t *gyroval = gyroGetAccum (); volatile const int16_t *gyroraw = gyroGetRaw (); |