Usage of Hysteresis library and sample code with LED.
Dependencies: HysteresisIn mbed
Revision 0:5913813b85d9, committed 2016-06-05
- Comitter:
- SIT2016
- Date:
- Sun Jun 05 13:15:22 2016 +0000
- Commit message:
- Usage of Hysteresis library and sample code with LED.
Changed in this revision
diff -r 000000000000 -r 5913813b85d9 HysteresisIn.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HysteresisIn.lib Sun Jun 05 13:15:22 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/kayekss/code/HysteresisIn/#fe43537bd3d6
diff -r 000000000000 -r 5913813b85d9 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Jun 05 13:15:22 2016 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" +#include "HysteresisIn.h" + +//analog pin, two thresholds and initial state +HysteresisIn hy(PTB0, 0.3, 0.7, 0); +DigitalOut led(PTA5); + +int main() { + while(1) { + led = hy.read(); //boolean value + wait(1); + + } +} +
diff -r 000000000000 -r 5913813b85d9 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Jun 05 13:15:22 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file