![](/media/cache/profiles/Pass2.jpg.50x50_q85.jpg)
TSI read values are now sent to the serial port. Red LED part of the RGB will light up with an intensity that depends on the TSI read value.
Fork of FRDM_TSI by
main.cpp@1:51b1b688179a, 2012-10-12 (annotated)
- Committer:
- chris
- Date:
- Fri Oct 12 11:42:21 2012 +0000
- Revision:
- 1:51b1b688179a
- Parent:
- 0:0f00f07ebde0
- Child:
- 6:288cb3530ef4
Tidied up formatting
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" |
emilmont | 0:0f00f07ebde0 | 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(); |
chris | 1:51b1b688179a | 10 | wait(0.1); |
emilmont | 0:0f00f07ebde0 | 11 | } |
chris | 1:51b1b688179a | 12 | } |