Program using Touch plane and accelerometer of FRDM-KL25Z board

Dependencies:   MMA8451Q TSI mbed

Fork of FRDM_TSI by mbed official

Committer:
emilmont
Date:
Thu Oct 11 11:05:51 2012 +0000
Revision:
0:0f00f07ebde0
Child:
1:51b1b688179a
KL25Z TSI example

Who changed what in which revision?

UserRevisionLine numberNew contents of line
emilmont 0:0f00f07ebde0 1 #include "mbed.h"
emilmont 0:0f00f07ebde0 2 #include "TSI_Sensor.h"
emilmont 0:0f00f07ebde0 3
emilmont 0:0f00f07ebde0 4 int main(void) {
emilmont 0:0f00f07ebde0 5 DigitalOut led(LED_GREEN);
emilmont 0:0f00f07ebde0 6 TSI_Sensor tsi;
emilmont 0:0f00f07ebde0 7
emilmont 0:0f00f07ebde0 8 while (true) {
emilmont 0:0f00f07ebde0 9 printf("slider percentage: %d%\r\n", tsi.getPercentage());
emilmont 0:0f00f07ebde0 10 printf("slider distance: %dmm\r\n", tsi.getDistance());
emilmont 0:0f00f07ebde0 11 wait(1);
emilmont 0:0f00f07ebde0 12 led = !led;
emilmont 0:0f00f07ebde0 13 }
emilmont 0:0f00f07ebde0 14 }