Here is some of the code I use but not a complete project. If you want to see how I used it take a look at my digital scale project. wifi scale project
//days and months information
const char* daystrings[7] = {"Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"};
const char* monthstrings[12] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
int days[7];
int today;
String currentTime;
String currentDate;
String currentMonth;
String currentDay;
// get the time and the day
void getCurrentTime() {
currentTime = String(String(hour()) + ":" + twoDigits(minute()) + ":" + twoDigits(second()));
currentMonth = monthstrings[month() - 1];
currentDate = String(day());
currentDay = daystrings[weekday() - 1];
}
BLYNK_CONNECTED() {
rtc.begin(); // Synchronize time on connection
}
BLYNK_CONNECTED() {
rtc.begin(); // Synchronize time on connection
// bridge_master.setAuthToken(reader_token); // Token of reader
Blynk.syncVirtual(adjpin, indexpin, knownweightpin);
}
// get the time and the day
void getCurrentTime() {
currentTime = String(hour()) + ":" + twoDigits(minute());
currentMonth = monthstrings[month() - 1];
currentDate = String(day());
currentDay = daystrings[weekday() - 1];
}