Isme light band chalu hotai do setpoints ke aas paas, hysteris account me leke

Dependencies:   HysteresisIn mbed

Fork of Hysteresis by Eduvance SIT2017

main.cpp

Committer:
akashlal
Date:
2016-06-29
Revision:
1:16341991cdfb
Parent:
0:5913813b85d9

File content as of revision 1:16341991cdfb:

#include "mbed.h"
#include "HysteresisIn.h"

//analog pin, two thresholds and initial state 
HysteresisIn    pot(PTB0, 0.3, 0.7, 0); 
DigitalOut led(PTD1);

int main() {
    while(1) {
        led.write(pot.read()); //boolean value
        wait(1);
    
    }
}