mbed-os

Fork of mbed-os by erkin yucel

features/unsupported/tests/mbed/tsi/main.cpp

Committer:
elessair
Date:
2016-10-23
Revision:
0:f269e3021894

File content as of revision 0:f269e3021894:

#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;
    }
}