For Telliskivi2 2014

Dependents:   Telliskivi2_2014

Fork of HumanInterface by Reiko Randoja

Files at this revision

API Documentation at this revision

Comitter:
Reiko
Date:
Sun Nov 23 02:28:04 2014 +0000
Parent:
4:0a82202bc5df
Commit message:
Removed ball debounce

Changed in this revision

HumanInterface.cpp Show annotated file Show diff for this revision Revisions of this file
HumanInterface.h Show annotated file Show diff for this revision Revisions of this file
diff -r 0a82202bc5df -r 64a46d67cb6e HumanInterface.cpp
--- a/HumanInterface.cpp	Fri Nov 21 18:19:47 2014 +0000
+++ b/HumanInterface.cpp	Sun Nov 23 02:28:04 2014 +0000
@@ -19,16 +19,19 @@
         
         buttonGoal.attach_deasserted(this, &HumanInterface::goalFall);
         buttonStart.attach_asserted(this, &HumanInterface::startRise);
-        inputBall.attach_asserted(this, &HumanInterface::ballRise);
-        inputBall.attach_deasserted(this, &HumanInterface::ballFall);
+        //inputBall.attach_asserted(this, &HumanInterface::ballRise);
+        //inputBall.attach_deasserted(this, &HumanInterface::ballFall);
+        
+        inputBall.rise(this, &HumanInterface::ballRise);
+        inputBall.fall(this, &HumanInterface::ballFall);
         
         buttonGoal.setSamplesTillAssert(20);
         buttonStart.setSamplesTillAssert(20);
-        inputBall.setSamplesTillAssert(2);
+        //inputBall.setSamplesTillAssert(2);
         
         buttonGoal.setSampleFrequency(1000);
         buttonStart.setSampleFrequency(1000);
-        inputBall.setSampleFrequency(5000);
+        //inputBall.setSampleFrequency(5000);
         
         redBlinking = false;
         goalBlinking = false;
diff -r 0a82202bc5df -r 64a46d67cb6e HumanInterface.h
--- a/HumanInterface.h	Fri Nov 21 18:19:47 2014 +0000
+++ b/HumanInterface.h	Sun Nov 23 02:28:04 2014 +0000
@@ -36,7 +36,9 @@
     
     PinDetect buttonGoal;
     PinDetect buttonStart;
-    PinDetect inputBall;    
+    //PinDetect inputBall;    
+    
+    InterruptIn inputBall;
        
     //Functions that PinDetect will call
     void goalFall();