SHARE
TWEET

mkr

wingames Mar 29th, 2020 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #define BLYNK_PRINT Serial
  2. #include <SPI.h>
  3. #include <Ethernet.h>
  4. #include <BlynkSimpleEthernet.h>
  5.  
  6. char auth[] = "YourAuthToken";
  7.  
  8. BlynkTimer timer;
  9.  
  10. void notifyUptime()
  11. {
  12.   long uptime = millis() / 60000L;  //Qui non capisco se calcola la  durata della chiamata.
  13.  
  14.   Blynk.notify(String("Running for ") + uptime + " minutes.");
  15. }
  16.  
  17. void setup()
  18. {
  19.  Serial.begin(9600);
  20.  
  21.   Blynk.begin(auth);
  22.  
  23.   Blynk.notify("Device started");
  24.   timer.setInterval(60000L, notifyUptime);//Qui parte la chiamata al server di Bkynk ogni 60 secondi.
  25. }
  26. void loop()
  27. {
  28.   Blynk.run();
  29.   timer.run();
  30. }
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