Advertisement
RuiViana

delay

Oct 15th, 2017
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. unsigned long delay1 = 0;
  2. unsigned long temperatura = 0;
  3. //-----------------------------------
  4. void setup()
  5. {
  6.   Serial.begin(9600);
  7.    delay1 = millis();
  8. }
  9. //-----------------------------------
  10. void loop()
  11. {
  12.   if ((millis() - delay1) >= 10000)
  13.   {
  14.     Serial.print("Temp: ");
  15.     Serial.println(temperatura);
  16.     delay1 = millis();
  17.   }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement