
LED will be ON on touch
main.cpp
- Committer:
- zatharv
- Date:
- 2022-05-20
- Revision:
- 0:3c056122d22d
File content as of revision 0:3c056122d22d:
//glow led on touch #include "mbed.h" #include "TSISensor.h" PwmOut red(LED1); int main() { TSISensor tsi; while(1) { if (tsi.readPercentage()) { red = 0; wait(0.1); } else { red = 1; } } }