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.
Dependencies: HysteresisIn mbed
Fork of Hysteresis by
Revision 1:16341991cdfb, committed 2016-06-29
- Comitter:
- akashlal
- Date:
- Wed Jun 29 06:38:55 2016 +0000
- Parent:
- 0:5913813b85d9
- Commit message:
- na
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Jun 05 13:15:22 2016 +0000
+++ b/main.cpp Wed Jun 29 06:38:55 2016 +0000
@@ -2,12 +2,12 @@
#include "HysteresisIn.h"
//analog pin, two thresholds and initial state
-HysteresisIn hy(PTB0, 0.3, 0.7, 0);
-DigitalOut led(PTA5);
+HysteresisIn pot(PTB0, 0.3, 0.7, 0);
+DigitalOut led(PTD1);
int main() {
while(1) {
- led = hy.read(); //boolean value
+ led.write(pot.read()); //boolean value
wait(1);
}
