Atharv More
/
B1_08_task5_tsi_touch
Diff: main.cpp
- Revision:
- 0:3c056122d22d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri May 20 08:23:42 2022 +0000 @@ -0,0 +1,21 @@ +//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; + } + } +} \ No newline at end of file