LED will be ON on touch

Dependencies:   mbed TSI

Files at this revision

API Documentation at this revision

Comitter:
zatharv
Date:
Fri May 20 08:23:42 2022 +0000
Commit message:
.

Changed in this revision

TSI.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 3c056122d22d TSI.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TSI.lib	Fri May 20 08:23:42 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/emilmont/code/TSI/#507b1f67804b
diff -r 000000000000 -r 3c056122d22d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri May 20 08:23:42 2022 +0000
@@ -0,0 +1,21 @@
+//glow led on touch
+
+#include "mbed.h"
+#include "TSISensor.h"
+
+PwmOut red(LED1);
+
+int main() {
+    TSISensor tsi;
+    while(1) {
+        if (tsi.readPercentage())
+        {
+            red = 0;
+            wait(0.1);
+        }
+        else
+        {
+            red = 1;
+        }
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 3c056122d22d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri May 20 08:23:42 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file