The TSI Analog slider demo for the freedom platform with Kinetis L MCU.
Dependencies: mbed tsi_sensor
Fork of frdm_tsi_slider by
Revision 2:b13f658fd99f, committed 2014-02-23
- Comitter:
- Kojto
- Date:
- Sun Feb 23 18:32:55 2014 +0000
- Parent:
- 1:8b95571e5424
- Commit message:
- Electrodes are part of Analog slider, app does not need to create own instances
Changed in this revision
main.cpp | 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 |
diff -r 8b95571e5424 -r b13f658fd99f main.cpp --- a/main.cpp Sat Feb 22 15:47:25 2014 +0000 +++ b/main.cpp Sun Feb 23 18:32:55 2014 +0000 @@ -1,7 +1,8 @@ #include "mbed.h" #include "tsi_sensor.h" -#if defined (TARGET_KL25Z) || defined (TARGET_KL46Z) +/* This defines will be replaced by PinNames soon */ +#if defined (TARGET_KL25Z) || defined (TARGET_KL46Z) #define ELEC0 9 #define ELEC1 10 #elif defined (TARGET_KL05Z) @@ -13,9 +14,7 @@ int main(void) { PwmOut led(LED_GREEN); - TSIElectrode elec0(ELEC0); - TSIElectrode elec1(ELEC1); - TSIAnalogSlider tsi(elec0, elec1, 40); + TSIAnalogSlider tsi(ELEC0, ELEC1, 40); while (true) { led = 1.0 - tsi.readPercentage();
diff -r 8b95571e5424 -r b13f658fd99f tsi_sensor.lib --- a/tsi_sensor.lib Sat Feb 22 15:47:25 2014 +0000 +++ b/tsi_sensor.lib Sun Feb 23 18:32:55 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/Kojto/code/tsi_sensor/#b7074bcc2376 +http://mbed.org/users/Kojto/code/tsi_sensor/#20ffa9b18488