darkness activated switch

Dependencies:   mbed

main.h

Committer:
faif
Date:
2015-03-15
Revision:
1:8cf180275a19
Parent:
0:aa10f42a839d

File content as of revision 1:8cf180275a19:

#ifndef MAIN_H
#define MAIN_H

enum {LedOff = 0, LedOn = 1};
const float THRES_ON = 0.5;    // when to turn the led on
const float THRES_OFF = 0.4;   // when to turn the led off

AnalogIn myldr(p20);
DigitalOut myled(LED2);

#endif