daily pastebin goal
43%
SHARE
TWEET

Untitled

a guest Oct 7th, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void loop()
  2. {
  3.   lux = analogRead(ldr);                    // le port analogico
  4.   atual = millis();
  5.   if ( lux < 800)                           // Se for menor que 800
  6.   {
  7.     tempo = atual - anterior;
  8.     sol = sol + tempo;                      // Acumule tempo de sol
  9.   }
  10.   anterior = atual;
  11.   Serial.println(sol);                      // Imprime acumulado de tempo de sol
  12.   delay(100);
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top