Isme LED ka state change karte h touch ke value pe

Dependencies:   TSI mbed

Fork of FRDM_TSI by mbed official

Files at this revision

API Documentation at this revision

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
--- 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