4424
Dependencies: TSI mbed nRF24L01P
main.cpp@1:2dbb8dcaeceb, 2018-06-07 (annotated)
- Committer:
- prtkmynk
- Date:
- Thu Jun 07 05:01:37 2018 +0000
- Revision:
- 1:2dbb8dcaeceb
- Parent:
- 0:753c28769057
Capacitve Touch sensor;
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 | } |