From 2ff1ac217ccbbab84b5c3b68db377fff89c824d1 Mon Sep 17 00:00:00 2001 From: ladislas Date: Thu, 25 Sep 2014 16:41:30 +0200 Subject: [PATCH] update shake detection test - #83 --- test/ShakeDetection/main.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/ShakeDetection/main.cpp b/test/ShakeDetection/main.cpp index aeea86d..b1bdf97 100644 --- a/test/ShakeDetection/main.cpp +++ b/test/ShakeDetection/main.cpp @@ -10,23 +10,24 @@ Led heart = Led(11, 12, 13); void mainThread() { - serio.begin(115200); Sensors::init(); Moti::init(); Moti::start(); + Serial.println("Starting"); + while (TRUE) { - if (Moti::isShakenX()) + if (Moti::isShakenX()) { heart.shine(Color::RedPure); - - else if (Moti::isShakenY()) + } + else if (Moti::isShakenY()) { heart.shine(Color::BluePure); - - else if (Moti::isShakenZ()) + } + else if (Moti::isShakenZ()) { heart.shine(255, 255, 255); - + } else heart.turnOff();