To obtain news data, it is necessary to add your WiFi and New York Times API key to the MatrixPortal S3.
Connect your MatrixPortal S3 board to your computer using a reliable data and power USB-C cable. Depending on your operating system, the board should appear as a thumb drive named CIRCUITPY in your File Explorer/Finder.
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
, and your New York Times API Key as "NYT_API_KEY
".
Once these are defined, CircuitPython will automatically connect to the network and start the webserver used for the workflow.
The web server is on port 80 unless overridden by CIRCUITPY_WEB_API_PORT
. It also enables MDNS.
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" # Your New York Time API Key NYT_API_KEY = "SUPER-LONG-API-KEY-STRING" # 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
Text editor powered by tinymce.