mbed-os

Fork of mbed-os by erkin yucel

Committer:
elessair
Date:
Sun Oct 23 15:10:02 2016 +0000
Revision:
0:f269e3021894
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elessair 0:f269e3021894 1 #include "mbed.h"
elessair 0:f269e3021894 2 #include "TSISensor.h"
elessair 0:f269e3021894 3
elessair 0:f269e3021894 4 int main(void) {
elessair 0:f269e3021894 5 DigitalOut led(LED_GREEN);
elessair 0:f269e3021894 6 TSISensor tsi;
elessair 0:f269e3021894 7
elessair 0:f269e3021894 8 while (true) {
elessair 0:f269e3021894 9 printf("slider percentage: %f%\r\n", tsi.readPercentage());
elessair 0:f269e3021894 10 printf("slider distance: %dmm\r\n", tsi.readDistance());
elessair 0:f269e3021894 11 wait(1);
elessair 0:f269e3021894 12 led = !led;
elessair 0:f269e3021894 13 }
elessair 0:f269e3021894 14 }