Isme LED ka state change karte h touch ke value pe
Fork of FRDM_TSI by
Revision 6:283bfb3a10c2, committed 2016-07-02
- Comitter:
- akashlal
- Date:
- Sat Jul 02 07:24:00 2016 +0000
- Parent:
- 5:b44f5f02b879
- Commit message:
- na
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b44f5f02b879 -r 283bfb3a10c2 main.cpp --- a/main.cpp Thu May 09 09:26:46 2013 +0000 +++ b/main.cpp Sat Jul 02 07:24:00 2016 +0000 @@ -6,7 +6,13 @@ TSISensor tsi; while (true) { - led = 1.0 - tsi.readPercentage(); - wait(0.1); + if(tsi.readPercentage()<0.5&&tsi.readPercentage()>0.00) + { + led = 1; + } + else if(tsi.readPercentage()>0.5) + { + led = 0; + } } } \ No newline at end of file