milliseconds.ino 839 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #include <ezTime.h>
  2. #include <WiFi.h>
  3. void setup() {
  4. Serial.begin(115200);
  5. while (!Serial) { ; } // wait for Serial port to connect. Needed for native USB port only
  6. WiFi.begin("your-ssid", "your-password");
  7. setInterval(60);
  8. waitForSync();
  9. Serial.println();
  10. for (int n = 0; n < 10; n++) {
  11. Serial.println(UTC.dateTime("l, d-M-y H:i:s.v T"));
  12. }
  13. Serial.println();
  14. Serial.println("Those milliseconds between the first and the last line ...");
  15. Serial.println();
  16. Serial.println(" ... most of that is spent sending to the serial port.");
  17. Serial.println();
  18. Serial.println();
  19. Serial.println();
  20. Serial.println("And ezTime is not making those milliseconds up either.");
  21. Serial.println();
  22. Serial.println(" ... Stick around as we do an NTP request every minute.");
  23. setDebug(INFO);
  24. }
  25. void loop() {
  26. events();
  27. }