Touch sensor easy programe

Dependencies:   TSI mbed

Files at this revision

API Documentation at this revision

Comitter:
kubaczyz
Date:
Tue Dec 17 20:25:47 2013 +0000
Commit message:
Najprostszy program wykorzystuj?cy `touch sensor`

Changed in this revision

TSI.lib 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
sensorr.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TSI.lib	Tue Dec 17 20:25:47 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/vsluiter/code/TSI/#4dc2f5a3a731
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Dec 17 20:25:47 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a842253909c9
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sensorr.cpp	Tue Dec 17 20:25:47 2013 +0000
@@ -0,0 +1,12 @@
+#include "mbed.h"
+#include "TSISensor.h"
+
+int main(void) {
+    PwmOut led(LED_GREEN);
+    TSISensor tsi;
+    
+    while (true) {
+        led = 1.0 - tsi.readPercentage();
+        wait(0.1);
+    }
+}