Created
March 22, 2018 03:33
-
-
Save kinasmith/d22e29a9cb19dfef50024bc44922ea1c to your computer and use it in GitHub Desktop.
time usage of time library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Time.h" | |
// read this: https://github.com/PaulStoffregen/Time/blob/master/examples/TimeSerial/TimeSerial.ino | |
// read this: https://codebender.cc/library/Time#Time.h | |
// ask me about what doesn't make sense. | |
//void setTime(int hr,int min,int sec,int day, int month, int yr); | |
void setup() { | |
Serial.begin(9600); | |
setTime(21,29,00,21,03,2018); //hour, minute, second, day, month, year | |
} | |
void loop() { | |
Serial.println(hour()); | |
Serial.println(":"); | |
Serial.println(minute()); | |
Serial.println(":"); | |
Serial.println(second()); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment