List of User-Defined Functions with Descriptions

•	String getValue(String data, char separator, int index): parses a specific number value from the time data (which is a string). For example, if data = ’12:55’, separator= ’:’, index=1; String that is returned is ‘55’ (index starts counting at 0)
•	bool getNTPtime(int sec): to update the time/date variables over the internet from the Network Time Protocol (NTP)
•	void showTime(tm localTime): prints the time data to the serial monitor
•	String Hour(tm localTime): gets the hour value (as a String) from the time data
•	String Minutes(tm localTime): gets the minutes value (as a String) from the time data
•	String Seconds(tm localTime): gets the seconds value (as a String) from the time data
•	String dayOfTheWeek(tm localTime): gets the day of the week (as a String) from the time data, which is an integer 0-6, the converts that to a String that is the name of that day for the web page. For example, if the day of the week = ‘1’, this function returns the String ‘Monday’
•	String month(tm localTime): gets the month (as a String) from the time data (which is an integer) and converts it to a String that is the name of the month. Starts at 0, which would be ‘January’
•	String dayOfTheMonth(tm localTime): gets the date (as a String) from the time data
•	String processor(const String& var): directs the ESP32 to one of the time functions above when the web interface calls for an update to any of those time/date values
•	void checkAlarmTime(int hour, int min): compares the alarm hour and minutes to the current hour and minutes to determine if it is time to activate the alarm. In the weekday mode will only activate Monday to Friday
•	void buzbuzz(): activates the buzzer during the alarm by changing the tone of the buzzer and handling the duration of that tone
•	void setSnooze(int delay): turns off the alarm and sets a new time for checkAlarmTime when the alarm will be activated again. Here, delay is the number of minutes.
•	void checkAmbientLight(): takes several measurements of the analog voltage between the LDR and 22kOhm resistor and sets a threshold that will be used to represent the lights are on in the room. If the ambient light is high, then it assumes the user is sleeping during the day, or with the light already on. It is assumed the room cannot get much brighter than that, so the threshold is set just below the ambient light level so that it will not accidently turn the alarm on.
•	void resetForTomorrow(): resets a number of variables for the next alarm so that it will operate from the beginning of the waking process when the alarm is triggered again
•	void playSound(int Tone, int Duration): activates the buzzer at the specified tone for the specified duration
•	void confirmSound(int tone1, int duration1, int tone2, int duration2): uses playSound() to play two specified tones for each specified duration. Used when an error or confirmation sound should be played.
•	void flashLED(long duration): checks if it is time to toggle the state of the LED pin, then resets the duration for this new state
•	void parseTimeData(int Hour, int Minute): separates the hour and minute data into their respective decimal place and stores them in an array of four elements. For example, if the time was 12:55, then the Hour= ‘12’ and the minute= ‘55’. The resultant array will be {1,2,5,5]. This function then updates and converts each of these numbers to a binary pattern. These patterns represent the active segments on the display for each number. A mutex semaphore is used to prevent this function from writing a binary pattern to the array while displayOneDigit() is reading the pattern.
•	byte getDigit(byte number): this returns a binary pattern for the second shift register so that the binary pattern from parseTimeData is applied to the correct digit on the display 
•	void displayOneDigit(byte n): uses shiftOut (an Arduino function) to write the correct binary patterns from parseTimeData and getDigit to the display. Only does one digit at a time
•	void codeForTask0(void * parameter): This is a task running separately and continuously on core 1 using the RTOS of the ESP32. It takes the mutex semaphore and uses displayOneDigit to write the displayOneDigit binary pattens to the display, then returns the semaphore. The semaphore prevents the collision of writing to one of the variables that stores the binary pattern at the same time as this reads it.
•	void showAlarm(): uses parseTimeData() to change the values of the current time for the hour and minute of the alarm. The microcontroller uses codeForTask0 as usual to show this hour and minute on the display as it usually does for the current time. This function also rapidly double flashes the indicator LED to indicate the display is not showing the current time.