digital light sensor using ardunio i2c pins

Dependents:   LoRaWAN_singlechannel_endnode

Fork of TSL2561 by Tuan Anh Nguyen

Files at this revision

API Documentation at this revision

Comitter:
Wayne Roberts
Date:
Fri Jul 10 11:12:34 2020 -0700
Parent:
2:1740d88b1edc
Commit message:
update to using mbed-6

Changed in this revision

TSL2561.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 1740d88b1edc -r 0f0aa5c510e6 TSL2561.cpp
--- a/TSL2561.cpp	Wed Jul 05 18:46:09 2017 +0000
+++ b/TSL2561.cpp	Fri Jul 10 11:12:34 2020 -0700
@@ -78,13 +78,13 @@
   switch (_integration)
   {
     case TSL2561_INTEGRATIONTIME_13MS:
-      wait_ms(14);
+        ThisThread::sleep_for(14);//wait_ms(14);
       break;
     case TSL2561_INTEGRATIONTIME_101MS:
-      wait_ms(102);
+      ThisThread::sleep_for(102);//wait_ms(102);
       break;
     default:
-      wait_ms(403);
+      ThisThread::sleep_for(403);//wait_ms(403);
       break;
   }
 
@@ -238,4 +238,4 @@
   // Disable the device by setting the control bit to 0x03
   //printf(" Power Off\r\n");
   write8(TSL2561_COMMAND_BIT | TSL2561_REGISTER_CONTROL, TSL2561_CONTROL_POWEROFF);
-}
\ No newline at end of file
+}