Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. void sendAPDS9301Data(){
  2. static unsigned long outLoopTimer = 0;
  3.  
  4. if (millis() - outLoopTimer >= 1000){
  5. outLoopTimer = millis();
  6. //LUX =apds.readCH0Level();
  7. uint16_t data[2]={apds.readCH0Level(), apds.readCH1Level()};
  8. float lux;
  9. memcpy(&lux,data,4);
  10. Serial.print("Luminous flux: ");
  11.  
  12. Serial.println(apds.readCH0Level(),6);
  13. Serial.println(lux);
  14. Serial.println("=================");
  15. sendZBData("Luminosidad", "APDS9301", millis(),lux, analogRead(A1), readVcc());
  16. }
  17.  
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement