shao ziyang / Mbed 2 deprecated FRDM_KL25Z_TSI_Touch

Dependencies:   TSI mbed

Files at this revision

API Documentation at this revision

Comitter:
shaoziyang
Date:
Thu May 21 16:37:26 2015 +0000
Commit message:
First version. Modify from mbed tsi libary.

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TSI.lib	Thu May 21 16:37:26 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/shaoziyang/code/TSI/#4b7c5856807e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu May 21 16:37:26 2015 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "TSISensor.h"
+
+int main(void) {
+    PwmOut led1(LED_BLUE);
+    PwmOut led2(LED_GREEN);
+
+    TSISensor tsi;
+
+    led1.period_ms(1);
+    led2.period_ms(1);
+
+    while (true) {
+        printf("\r\n");
+        for(uint8_t i = 0; i < ELECTRODE_NUM; i++)
+            printf("%d:%d-%f ", tsi.Pressed(i), tsi.readTSI_u16(i),tsi.readTSI(i));
+
+        led1 = 1-tsi.readTSI(0);
+        led2 = 1-tsi.readTSI(1);
+
+        wait(0.1);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu May 21 16:37:26 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/dbbf35b96557
\ No newline at end of file