The TSI Analog slider demo for the freedom platform with Kinetis L MCU.

Dependencies:   mbed tsi_sensor

Fork of frdm_tsi_slider by Freescale

Files at this revision

API Documentation at this revision

Comitter:
Kojto
Date:
Sat Feb 22 11:26:37 2014 +0000
Child:
1:8b95571e5424
Commit message:
The TSI Analog slider demo for FRDM boards (Kinetis L)

Changed in this revision

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
tsi_sensor.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Feb 22 11:26:37 2014 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include "tsi_sensor.h"
+
+#if   defined (TARGET_KL25Z) || defined (TARGET_KL46Z)
+  #define ELEC0 9
+  #define ELEC1 10
+#elif defined (TARGET_KL05Z)
+  #define ELEC0 9
+  #define ELEC1 8
+#else
+  #error TARGET NOT DEFINED
+#endif
+
+int main(void) {
+    PwmOut led(LED_GREEN);
+    TSIElectrode elec0(ELEC0);
+    TSIElectrode elec1(ELEC1);
+    TSIAnalogSlider tsi(elec0, elec1, 40);
+    
+    while (true) {
+        led = 1.0 - tsi.readPercentage();
+        wait(0.1);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Feb 22 11:26:37 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tsi_sensor.lib	Sat Feb 22 11:26:37 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/Kojto/code/tsi_sensor/#8a2098a10330