Example program to control the brightness of an LED using the touch sensor interface
Dependents: FRDM-KL46Z_LCD_Test FRDM-KL46Z_LCD_Test FRDM-KL46Z_I2C-Scanner
Legacy Warning
This is an mbed 2 example. To learn more about mbed OS 5, visit the docs.
main.cpp
- Committer:
- chris
- Date:
- 2012-10-12
- Revision:
- 1:51b1b688179a
- Parent:
- 0:0f00f07ebde0
File content as of revision 1:51b1b688179a:
#include "mbed.h" #include "TSISensor.h" int main(void) { PwmOut led(LED_GREEN); TSISensor tsi; while (true) { led = 1.0 - tsi.readPercentage(); wait(0.1); } }