Some big updates to the software for the modified PyPortal Event Countdown Clock. The UI was changed and several features added. It also seems to be more stable as it does not lock-up randomly. Let’s get into the changes.
- Header and Footer status bars display information
- Touch to change between Fahrenheit and Celsius
- Touch to change between 24 hour and 12 hour formats
- Network Strength
- Touching the left side of the footer, dims the display backlight
- Touching the right side of the footer, increases the brightness of the display backlight
- Touching the middle of the footer, returns to auto brightness of the display backlight
- Event of the number of events
- Change the event displayed by touching the left of the display to show previous event or the right side to advance to the next event.
- If an event has passed more than a day ago, they will be removed from the list of events and no longer displayed
- The events do not need to be in order in the JSON file. They are sorted when they are loaded from the SD Card with the soonest event being displayed first.
Noticed that the temperature was several degrees too high. This was due to the ADT7410 being too close to devices generating heat. I removed the ADT7410 and placed it on a small board and added a PH2 JST connector so it may be plugged into the I2C socket. This resulted in much more usable temperature reading.
Adafruit PyPortal Titano
I just purchased an Adafruit PyPortal Titano, Product ID: 4444, to test out the software and see about allowing the software to be used on different sized screens. The Titano, has a 480×320 screen verses 320×240 of the PyPortal, Product ID: 4116.
The PyPortal Titano that I received had CircuitPython 5 installed, so the first order of business was to install CircuitPython 8. I started by going to the PyPortal CircuitPython Guide on Learn.Adafruit.
- Download the latest version of CircuitPython for the PyPortal Titano board by going to https://circuitpython.org/board/pyportal_titano/
- Download the UF2 file for CircuitPython 8.0.5
- Double click the reset button on the back of the Titano board and make certain the RGB LED turns green. If is is not green, try again.
- Copy the file to the PORTALBOOT drive that shows on your PC
NOTE: Do not be concerned that the preinstalled demo no longer works. The library files are different for different versions.
- Download the CircuitPython 8 library files from https://circuitpython.org/libraries
NOTE: This step is optional as the required libraries are in the GitHub project files
- Go to GitHub and download the project files from https://github.com/richteel/PyPortal_Events
- Delete the files on the PyPortal Titano
- Unzip the files and copy the files in the PyPortal folder to the PyPortal Titano
- The PyPortal Titano will restart and the images will change between “Connecting to the Internet” and “Failed to Connect”. The images will not take up the full screen due to the difference in resolution. (Until the code is modified.) The reason it is not connecting is we need add files to an SD Card and put that into the PyPortal Titano.
- Copy the files in the SD_Card folder, from GitHub, and paste them into the root of a micro SD Card.
- While the SD Card is still in you PC, double click on the index.html file to open the configuration utility.
- You may choose to load the config.json file on the card or start creating a new file from scratch by adding new events.
- Once you are satisfied with the events, click on the “Secrets” tab and enter your Wi-Fi settings, Timezone, and Adafruit IO Account information.
- Once done, click the “Save JSON File” button and save it to the SD Card as config.json.
- Remove the card from the PC and insert it into the PyPortal Titano.
- Click the reset button on the back of the PyPortal Titano.
- If everything was done correctly, you can anticipate that the events will be displayed on the screen
You may notice from the image of the PyPortal Titano screen, the temperature is not displayed as the PyPortal Titano does not have the ADT7410 Temperature Sensor.
The next step will be to see how to detect the screen size or make it a setting in the config.json file.
You must log in to post a comment.