This will control the brightness of the red led using the capacitive touch sensor present onboard the KL25Z board.

Dependencies:   TSI mbed

main.cpp

Committer:
animesh44
Date:
2018-06-27
Revision:
0:19967d57a803

File content as of revision 0:19967d57a803:

#include "mbed.h"
#include "TSISensor.h"


int main() {
TSISensor tsi;    
PwmOut myled(LED1);
    while(1) {
        myled = 1-tsi.readPercentage();
        wait(0.1);
    }
}