Suresh Natarajan
/
FRDM_TSI
Touch LED
Fork of FRDM_TSI by
main.cpp@6:6a7da12598ff, 2015-08-31 (annotated)
- Committer:
- 9677223479
- Date:
- Mon Aug 31 08:37:10 2015 +0000
- Revision:
- 6:6a7da12598ff
- Parent:
- 1:51b1b688179a
Touch LED;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emilmont | 0:0f00f07ebde0 | 1 | #include "mbed.h" |
chris | 1:51b1b688179a | 2 | #include "TSISensor.h" |
9677223479 | 6:6a7da12598ff | 3 | |
emilmont | 0:0f00f07ebde0 | 4 | int main(void) { |
chris | 1:51b1b688179a | 5 | PwmOut led(LED_GREEN); |
chris | 1:51b1b688179a | 6 | TSISensor tsi; |
emilmont | 0:0f00f07ebde0 | 7 | |
emilmont | 0:0f00f07ebde0 | 8 | while (true) { |
chris | 1:51b1b688179a | 9 | led = 1.0 - tsi.readPercentage(); |
9677223479 | 6:6a7da12598ff | 10 | wait(01); |
emilmont | 0:0f00f07ebde0 | 11 | } |
chris | 1:51b1b688179a | 12 | } |