Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of HumanInterface by
Revision 5:64a46d67cb6e, committed 2014-11-23
- 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();
