-
Goodbye
09/11/2023 at 16:28 • 0 commentsAs I already wrote at #Video Pendant, it's time to end this project. While I still think it should be possible to make animated GIF images displayed with this hardware, I simply don't have the energy to write the kind of optimized code that would be needed, and in the meantime there are much more powerful microcontrollers out there that can do it without a problem and as cheaply. So I'm shelving this.
I might revisit the idea in the future, but it will probably be with a different display and definitely with a different microcontroller.
-
Some Progress
10/01/2021 at 20:51 • 0 commentsI had a friend visiting over the weekend, and they were interested in this project, so we sat down together and made some progress with it. I assembled a second unit, flashed the usual bootloader to it, and started to work on the CircuitPython firmware with the displayio library included.
Right away I ran into a stumbling block: displayio is too large to fit on the SAMD21 flash by default, even with all the unneeded modules disabled. Fortunately I had a similar problem with #PewPew OLED before, and I knew that reducing the size of the filesystem from 64kB to 48kB solves that problem.
Next problem took us some more time to resolve. I copied the display initialization code from #PewPew M4, since both displays use the same ST7735, they just differ in size. But on the pendant this code was crashing the whole firmware. It took me some time to figure out that the PA10 pin I used as MOSI for the display can't in fact be used as MOSI, despite what my notes say. Instead, pin PA11 should be used. So we cut the trace, bodged the connection to one pin to the right, and this time got working firmware. But unfortunately with non-working display still.
Two days later I finally figured out what was wrong. I typed the value I was writing to MADCTL register as binary value, with "0b" at the beginning, but I forgot this is C, not Python, and that means something else. After writing that in hex with "0x" the display magically started working:
The next step is to write the code for decoding GIF images. I already have working code for CircuitPython, so I tried that. Unfortunately (but predictably), I ran out of memory. So next, I need to figure a way of sending the data straight to the display, without buffering it first in RAM. I might need to use a C library for reading that GIF file for this, we will see.
-
Battery Holder
06/14/2021 at 13:31 • 0 commentsA separate task is going to be designing the battery holder. For now I'm just using an off-the-shelf battery box, with a switch on it, and it's enough for testing, but eventually a separate special design will probably be necessary.
There are two main problems to solve here:
- Since the battery holder will be worn on the back of your neck, it will be in contact with a rather sensitive part of your body — I will need to make sure it's safe for your skin.
- Since it's relatively large and heavy, an ergonomic shape will be necessary.
-
Reading GIFs in CircuitPython
06/14/2021 at 13:27 • 0 commentsThis is not advertised very much, but CircuitPython can now load GIF files using the Adafruit's Image Load library — I have added GIF support to it a while ago, based on the example code a wrote here: https://github.com/deshipu/circuitpython-gif
However, there is one small technicality: that library doesn't handle animated GIFs.
An animaterd GIF image actually contains multiple images inside, each representing one frame of the animation. They can contain the whole frame, or just the differences from the previous frame, with everything else transparent.
I will need to modify my code to make it read one frame at a time — the SAMD21 microcontroller I'm using probably doesn't have enough memory to read all the frames at once. Hopefully the code will be fast enough to animate the image reasonably well.
If that fails, I might need to include a library written in C to read and display the animations.
-
The Screen
06/14/2021 at 13:20 • 0 commentsI'm still using the same tiny ST7735 color TFT screen, with a new PCB added to the back of it, containing just the microcontroller and a micro-USB socket made of the PCB itself — to make the whole thing as thin as possible. I will probably need to cast it in resin eventually, so it's a sturdy, one-piece thing. For now, for ease of debugging, I'm keeping it separate.
I will need to make at least one more version of that PCB, to include touch pads for switching the image on the pendant.
-
Continuing from Previous Project
06/14/2021 at 13:17 • 0 commentsI haven't touched the #Video Pendant project in a while, but I think it's really time to resurrect it now. CircuitPython has grown a lot in this time, and I also wrote a library that reads GIF files in Python, so there is much that can be improved on the software side.
On the hardware side, I'm going to continue where I left off. I will use the new configuration, with the screen on one end, and the battery holder worn on your back, under the shirt:
This allows the pendant itself to be much smaller, and the battery to be much larger. I will probably switch to a pair of regular alkaline AAA batteries, instead of rechargeable LiPO. They are safer and much easier to get. Also, I don't need to ship them with the device.