Wawa:
Constructing a giant clock controlled with a WiFi device would be a giant step for a newbie.
I think OP could be biting off more than he currently can chew.
Baby steps.
First, make sure you can control one LED. For example, have it turn on during the odd-numbered seconds, and off during the even-numbered seconds. You don't need to worry about precise WiFi timekeeping just yet.
Of course, in order to do anything based on the seconds, you will need some way of getting at the seconds, and so here is an example sketch I wrote to do just that:
// how_long_running_serial.ino
// by odometer 2018-12-17
// This sketch answers the question: "How long have I been running?"
// The answer is shown on the Serial monitor
#include <LiquidCrystal.h>
// declare and initialize variables
int nowDays = 0; // "days" part of elapsed time
int nowHours = 0; // "hours" part of elapsed time
int nowMinutes = 0; // "minutes" part of elapsed time
int nowSeconds = 0; // "seconds" part of elapsed time
int nowTenths = 0; // "tenths of seconds" part of elapsed time
unsigned long microsAtLastTenth = 0UL; // value of micros() at most recent 1/10 second
// a pretty important constant
const unsigned long MICROS_PER_TENTH = 100000UL; // number of microseconds per 1/10 second
void setup() {
// prepare Serial for use
// Note: the Serial monitor baud rate MUST match the number in the parentheses
Serial.begin(115200);
// show the time (which at this point will be all zeros) on the Serial monitor
showTimeOnSerial();
}
void loop() {
// check if it is time for the clock to advance
if ((micros() - microsAtLastTenth) >= MICROS_PER_TENTH) {
// make the clock advance 1/10 of a second
nowTenths++;
// make sure that the next advance happens exactly when it is due
// (they should happen exactly at intervals of 1/10 of a second)
microsAtLastTenth += MICROS_PER_TENTH;
// our clock needs to do more than count tenths of seconds
// it also needs to count whole seconds, and minutes, and hours, and days
// so let's go ahead and do that
// too many tenths?
if (nowTenths >= 10) {
// trade 10 tenths for 1 second
nowTenths -= 10;
nowSeconds++;
}
// too many seconds?
if (nowSeconds >= 60) {
// trade 60 seconds for 1 minute
nowSeconds -= 60;
nowMinutes++;
}
// too many minutes?
if (nowMinutes >= 60) {
// trade 60 minutes for 1 hour
nowMinutes -= 60;
nowHours++;
}
// too many hours?
if (nowHours >= 24) {
// trade 24 hours for 1 day
nowHours -= 24;
nowDays++;
}
// show the new time on the Serial monitor
showTimeOnSerial();
}
}
void showTimeOnSerial () {
// function to show the current elapsed time on the Serial monitor
//
// we want to print the time like this
// Position: 0123456789012345678901
// Output: 0 days 00:00:00.0
// declare a buffer for storing a string (we'll need it later)
// we expect to need only 21 characters, but to be safe, let's make room for 30
// so we allow 30 characters worth of room, plus 1 extra for the null terminator
// (Always allow 1 character extra worth of room for the null terminator!)
char buf[31];
// convert the elapsed time to a string
// for days, allow 5 digits worth of room
// for hours, minutes, and seconds, allow 2 digits for each, and use leading zeros
// for tenths, allow 1 digit worth of room
sprintf(buf, "%5d days %02d:%02d:%02d.%1d", nowDays, nowHours, nowMinutes, nowSeconds, nowTenths);
// show the string for the elapsed time
Serial.println(buf);
}
If you don't know what a "Serial monitor" is, or what a "baud rate" is, now is the time for you to do research to find out. Also, if you don't know how to write code to determine whether a number is odd or even, you really should do some research to find out. (Hint: "modulo operator")
Once you've worked out how to control one LED based on the time, the next step is to control multiple LEDs. For that, I suggest that you work out how to control the seven LEDs required for one digit, and that you make them show the "ones" digit of the seconds. The goal is to have one digit of your clock working, counting from 0 to 9 over and over again, one number per second. In order to do this, you will need to work out which LEDs should be on when, and turn them on and off accordingly. For example, the lower right vertical LED should always be on, except when showing the digit 2. (To see why, watch the seconds change on an "old-fashioned" digital wristwatch. If you don't actually own such a wristwatch, look at a video such as this one: https://www.youtube.com/watch?v=tAWEiIyr6zc)
Then you will proceed to multiple digits and thus controlling a large number (several dozen) of LEDs. For testing purposes, you will probably want to speed up the clock to make sure that the minutes and hours are working. By this point, you will probably have figured out how to do that.
Finally, it will be time for the WiFi. I really don't know much about that sort of thing, as I've never used WiFi in any of my projects, so I can't really help you there.