The digital clock needs your WiFi and WorldTimeAPI token to fetch JSON current time data.
Plug your Feather board into your computer via a known good data + power USB cable. Your board should appear as a thumb drive in your File Explorer / Finder (depending on your operating system) named CIRCUITPY.
Create a file with the name settings.toml in the root directory of the CIRCUITPY drive.
Add the following below:
The file should contain the keys CIRCUITPY_WIFI_SSID, CIRCUITPY_WIFI_PASSWORD, CIRCUITPY_WEB_API_PASSWORD, CIRCUITPY_WEB_API_PORT and TIMEZONE.
Change CIRCUITPY_WIFI_SSID and CIRCUITPY_WIFI_PASSWORD to match your network credentials.
Valid time zones can be found in the WorldTimeAPI documentation here. Pick the closest place that has your same time (for example America/New_York also works for Boston, Washington DC, and Miami).
The web server is on port 80 unless overridden by CIRCUITPY_WEB_API_PORT. It also enables MDNS.
Once these are defined, CircuitPython will automatically connect to the network and start the webserver used for the workflow.
Here is an example settings.toml:
# To auto-connect to WiFi CIRCUITPY_WIFI_SSID="YOUR-WIFI-NETWORK-NAME" CIRCUITPY_WIFI_PASSWORD="YOUR-WIFI-NETWORK-PASSWORD" # Current location TIMEZONE="YOUR-COUNTRY/YOUR-STATE" # example: "America/New_York" # To enable modifying files from the web. Change this too! # Leave the User field blank in the browser. CIRCUITPY_WEB_API_PASSWORD="passw0rd" CIRCUITPY_WEB_API_PORT=80
Page last edited March 08, 2024
Text editor powered by tinymce.