You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
Markdown
40 lines
1.1 KiB
Markdown
# Project 0
|
|
|
|
This folder is actually dedicated to LVGL running on Unix. Unfortunately, the matrix of hardware, lib versions etc is so great that you can't really make this binary portable across multiple linux versions. You have to build from source. I do have a copy of a unix LVGL Python stored in the `./builds` dir though build for Ubuntu LTS 24.04. You can always try your luck there, but I expect you will still need to build from source.By convention I include the a short sha of the commit from https://github.com/lvgl-micropython/lvgl_micropython that I built this off of.
|
|
|
|
The demos contained here are mostly just ports of the demos found in official LVGL docs
|
|
## Usage
|
|
|
|
If all is going to plan you should be able to
|
|
|
|
```
|
|
cd ./project0
|
|
cp ./builds/<unix upy binary> ./micropython
|
|
./micropython
|
|
```
|
|
|
|
Then in the REPL
|
|
```
|
|
import test_lv
|
|
```
|
|
|
|
Where you should see
|
|
|
|

|
|
|
|
|
|
Now, you can us lvgl functions to change objects within the display and screen.
|
|
|
|
```
|
|
import lvgl as lv
|
|
test_lv.scrn.set_style_bg_color(lv.color_hex(0x573a00), 0)
|
|
```
|
|
|
|

|
|
|
|
To exit
|
|
|
|
```
|
|
import sys;sys.exit()
|
|
```
|