![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
darkness activated switch
main.h@1:8cf180275a19, 2015-03-15 (annotated)
- Committer:
- faif
- Date:
- Sun Mar 15 17:16:15 2015 +0000
- Revision:
- 1:8cf180275a19
- Parent:
- 0:aa10f42a839d
revised
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
faif | 0:aa10f42a839d | 1 | #ifndef MAIN_H |
faif | 0:aa10f42a839d | 2 | #define MAIN_H |
faif | 0:aa10f42a839d | 3 | |
faif | 0:aa10f42a839d | 4 | enum {LedOff = 0, LedOn = 1}; |
faif | 1:8cf180275a19 | 5 | const float THRES_ON = 0.5; // when to turn the led on |
faif | 1:8cf180275a19 | 6 | const float THRES_OFF = 0.4; // when to turn the led off |
faif | 0:aa10f42a839d | 7 | |
faif | 1:8cf180275a19 | 8 | AnalogIn myldr(p20); |
faif | 1:8cf180275a19 | 9 | DigitalOut myled(LED2); |
faif | 0:aa10f42a839d | 10 | |
faif | 0:aa10f42a839d | 11 | #endif |