I got a great refresher on Python and its basic syntax after not using it for a while. I also taught my partner a little more about Python. I learned how to properly check for errors with a while True statement. I want to learn more about functions and more advanced data storage/manipulation.
I have certainly reached my limit of python understanding- a lot of this was stuff I had to re-learn. I played around a lot with lists and dictionaries today.Â
I want to learn more about how you can pass functions or lamdas or other conditionals into lists.
The challenge I tried to solve was displaying Chinese characters on the TFT display. Because text is normally displayed with ASCII, storage is limited, and Chinese has thousands of characters, it's not very easy to get those characters to display on the display. My solution was to write a shell script on my laptop that uses python text tools and otf2bdf converter to strip a subset of characters (only those used in my program) from a Chinese OTF font and package it in a btf (bitmap font). Using the adafruit_bitmap library, these characters can be displayed on the microcontroller display. Using the Chinese localization of the OpenWeatherMap API, I was able to display the current weather in Chinese.
As an extra bit of fun, I wanted to show icons along with my weather. Using the ImageMagick CLI tool, I converted SF Symbol SVG icons to BMPs, uploaded them to the microcontroller, and used the API to display the correct icon according to the weather condition. This isn't finished yet-- I want to make it look much prettier, this was simply a proof of concept.
I will use the M4 Express microcontroller and a microphone to create a reflecting "halo" of light behind my speaker by shining lights out the holes in the back of my speaker. The microphone will be utilised to make the lights reactive to the sound output. I wish I could also use an ESP32 with the TFT-- it would be cool to have both, but oh well.