Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

venturem/AceMagic-S1-LED-TFT-Linux

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VentureM - Releasing the python code for public usage.

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.

Running this is super simple -

cd python
python lcddsp.py

If you run into any issues relating to import not working, please run pip install -r requirements.txt

Sample Image :

savedImage


VentureM starts his work on this TFT

Thats an excellent start point for me !! - My rant starts

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 :

image

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 :)

And we have the next issue.

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.

07-04-2024 LED control is implemented !!!

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.

XX-05-2024 Next is to implement the TFT screen handler

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.

IMG_20240427_191132

IMG_20240505_110547

wallpaper

XX-XX-2024 Create a FAST API to control this from endpoint

XX-XX-2024 Later to dockerise the whole thing

AceMagic-S1-LED-TFT-Linux

ACEMAGIC S1 Mini TFT/LCD Control for Linux

About

ACEMAGIC S1 Mini TFT/LCD and LED Control for Linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%