![](/media/cache/profiles/bd5efd20660e5dbb53b426359cbeb5bc.jpg.50x50_q85.png)
Usage of Hysteresis library and sample code with LED.
Dependencies: HysteresisIn mbed
main.cpp
- Committer:
- SIT2016
- Date:
- 2016-06-05
- Revision:
- 0:5913813b85d9
File content as of revision 0:5913813b85d9:
#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); } }