Usage of Hysteresis library and sample code with LED.

Dependencies:   HysteresisIn mbed

Files at this revision

API Documentation at this revision

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

HysteresisIn.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /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
--- /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);
+    
+    }
+}
+
--- /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