Touch LED

Dependencies:   TSI mbed

Fork of FRDM_TSI by mbed official

main.cpp

Committer:
9677223479
Date:
2015-08-31
Revision:
6:6a7da12598ff
Parent:
1:51b1b688179a

File content as of revision 6:6a7da12598ff:

#include "mbed.h"
#include "TSISensor.h"
 
int main(void) {
    PwmOut led(LED_GREEN);
    TSISensor tsi;
    
    while (true) {
        led = 1.0 - tsi.readPercentage();
        wait(01);
    }
}