-
-
used in SPI mode
-
1.3" 64×128 px
-
SH1107
-
Flash your Pico with MicroPython.
Enter your WiFi credentials in the lib/env.py
file.
SSID = "SSID"
PASSWORD = "WIFI_PASSWORD"
As soon as the Pico
is plugged in, it connects to the specified WiFi Access Point.
Then, it fetches the current time from an open API, disconnects from the WiFi and updates the time every second.
The default time zone is equal to Europe/Berlin, but it can easily be changed in the initialize_time.py
file by referring to the official docs.
response = urequests.get("https://timeapi.io/api/time/current/zone?timeZone=Europe%2FBerlin")
The default time format is hh:mm:ss
, and the corresponding date format is DD.MM.YYYY
, which can be modified in the display.py
file.
time_string = f"{hour:02}:{minute:02}:{second:02}"
date_string = f"{day:02}.{month:02}.{year}"
Every new day at 00:00:00 (can be edited in the main.py
file), the time is synchronized again by reconnecting to the Access Point, if it is available.
if current_hour == 0 and current_minute == 0 and current_second == 0:
By pressing KEY0
, the program is restarted, pressing KEY1
switches between displaying the current date and time, only displaying the time, and clearing the screen completely.
Holding down KEY0
for five seconds will shutdown the Pico
safely.