Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define BLYNK_PRINT Serial
- #include <SPI.h>
- #include <Ethernet.h>
- #include <BlynkSimpleEthernet.h>
- char auth[] = "YourAuthToken";
- BlynkTimer timer;
- void notifyUptime()
- {
- long uptime = millis() / 60000L; //Qui non capisco se calcola la durata della chiamata.
- Blynk.notify(String("Running for ") + uptime + " minutes.");
- }
- void setup()
- {
- Serial.begin(9600);
- Blynk.begin(auth);
- Blynk.notify("Device started");
- timer.setInterval(60000L, notifyUptime);//Qui parte la chiamata al server di Bkynk ogni 60 secondi.
- }
- void loop()
- {
- Blynk.run();
- timer.run();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement