4424
Dependencies: TSI mbed nRF24L01P
main.cpp@0:753c28769057, 2017-03-31 (annotated)
- Committer:
- prtkmynk
- Date:
- Fri Mar 31 08:09:05 2017 +0000
- Revision:
- 0:753c28769057
135;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
prtkmynk | 0:753c28769057 | 1 | #include "mbed.h" |
prtkmynk | 0:753c28769057 | 2 | #include "TSISensor.h" |
prtkmynk | 0:753c28769057 | 3 | Serial pc(USBTX,USBRX); |
prtkmynk | 0:753c28769057 | 4 | TSISensor TSI; |
prtkmynk | 0:753c28769057 | 5 | |
prtkmynk | 0:753c28769057 | 6 | float sensor; |
prtkmynk | 0:753c28769057 | 7 | |
prtkmynk | 0:753c28769057 | 8 | main() |
prtkmynk | 0:753c28769057 | 9 | { |
prtkmynk | 0:753c28769057 | 10 | while(1) |
prtkmynk | 0:753c28769057 | 11 | { |
prtkmynk | 0:753c28769057 | 12 | sensor=(100*TSI.readPercentage()); |
prtkmynk | 0:753c28769057 | 13 | pc.printf("%0.2f\n\r",sensor); |
prtkmynk | 0:753c28769057 | 14 | wait(0.2); |
prtkmynk | 0:753c28769057 | 15 | } |
prtkmynk | 0:753c28769057 | 16 | } |