mbed-os

Fork of mbed-os by erkin yucel

Revision:
0:f269e3021894
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/features/unsupported/tests/mbed/tsi/main.cpp	Sun Oct 23 15:10:02 2016 +0000
@@ -0,0 +1,14 @@
+#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;
+    }
+}