mbed-os
Fork of mbed-os by
features/unsupported/tests/mbed/tsi/main.cpp
- Committer:
- xuaner
- Date:
- 2017-07-20
- Revision:
- 1:3deb71413561
- Parent:
- 0:f269e3021894
File content as of revision 1:3deb71413561:
#include "mbed.h" #include "TSISensor.h" int main(void) { DigitalOut led(LED_GREEN); TSISensor tsi; while (true) { printf("slider percentage: %f%\r\n", tsi.readPercentage()); printf("slider distance: %dmm\r\n", tsi.readDistance()); wait(1); led = !led; } }