This projet leverages eyes UI to act as a clock. Hours and minutes are shown by left eye and right eye respectively. Second is shown by one of the sixty circles.
Hardware
The following components are required for this project:
pins connection between WizFi360-EVB-Pico and LCD Display Module GC9A01
Software architecture
There are three critical tasks in the system: App, GUI, and Wiznet.
App functions as the system controller, managing and communicating with the other tasks.
GUI responds to the RTC update event (AppEvent.RtcUpdate) by displaying time information on the GC9A01 display.
Wiznet connects to the NTP server to retrieve the correct time and initializes the RP2040 RTC.
event communication between Wiznet task and App task
event communication between timer task, App task and Gui task
Demo settings
WizFi360 connected to WiFi AP is required to synchronize RP2040 system clock by retrieving the current time from an Internet-based Network Time Protocol (NTP) server.
WiFi credentials are stored in the file "secrets.py". Please replace them with your own WiFi settings.
wifi = {
"ssid": "<replace with WiFi SSID>",
"password": "<replace with WiFi password>",
}
To help the user understand the time information presented on the artistic clock UI, this demo includes two user interfaces: one is a standard UI (without a digital clock), and the other features a digital clock.
User can enable the digital clock by setting "ENABLE_DIGITAL_CLOCK = True" in "class DigitalClock" in digital_clock.py.
class DigitalClock:
ENABLE_DIGITAL_CLOCK = True
To allow the user to visualize the artistic clock UI without waiting 24 hours, a fast RTC simulation is implemented. This simulation generates an RtcUpdate event every 100 milliseconds instead of once per second.
User can enable the digital clock by setting "ENABLE_DIGITAL_CLOCK = True" in "class App" in app.py