Over the last few weekends I have spent time refining the code so that it can draw a few rudimentary things on the screen. Basically, it relies a lot on the Pillow image library for processing the image and then renders on TFT display. Note that actual TFT device is quite slow to render and hence I had to implement a block based apprach for rendering, This 'dirty rectange' render is much faster, but also suffers from a consequence - rendering variable length text may corrupt the background display.
Please let me know if any help in needed, or any issues observed.
cd python
python lcddsp.py
If you run into any issues relating to import not working, please run pip install -r requirements.txt
So I have had this machine for about 6 months, am one of the early adopters. However I was stuck with the same issue, the TFT can only be used in Windows and with the warnings I was getting in Windows, I was not planning to keep running windows. The original purpose of this machine was to work as a home server so that I could run my LLM experiments on this, while utilising cloud instances and other powerfull local machines for actual computing needs. Once I installed Bodhilinux, I found myself stuck with clock display and nothing else. Probing the USB devices led to below :
Now the challenge was to understand what was going on here - but due to work commitments I could not spend too much time on this. As a result even today (31 March 2024), the TFT still shows time only :)
It seems that the default firmware is coded to show time, but the developer did not bother with intricacies like Daylight Time Savings - so today when UK rolls back time, the clock is one hour behind with no other option but to work on this issue. Many thanks to the OP for starting this thread; and time and effort spent in capturing the data packets.
The LED control has been implemented in python using PySerial - did need a few reboots into Windoz to get the CRC right, but I belive it is now fixed and working as expected. Please raise an issue if you find a bug, I'll endeavour to replicate and fix the issue.
I have been able to implement a Screen handler with some effort. As said by @tjaworski, the framebuffer of LCD is extremely slow. Slow to the extent that it takes 2.8 to 3.3 seconds if you try to update the whole screen. So naturally, we have to create and maintain a offline buffer and update LCD framebuffer only if and when required. This introduces some hassle and complexity. Also in my case (as maybe with many other folks), the minipc is in vertical orientation, while the framebuffer is in horizontal orientation, this needs x,y axis translation and rotation, plus bounding on the axes to get correct result.
Screenshots of what has been acheived. I'll be updating the code once I have better handling for both; vertical and horizontal orientations.
Original Text from [https://github.com/tjaworski](https://github.com/tjaworski/AceMagic-S1-LED-TFT-Linux)
ACEMAGIC S1 Mini TFT/LCD Control for Linux