https://github.com/kisvegabor/lv_mpy
sudo apt-get install build-essential libreadline-dev libffi-dev git pkg-config libsdl2-2.0-0 libsdl2-dev
git clone --recurse-submodules https://github.com/kisvegabor/lv_mpy.git
cd ./micropython/ports/unix
make axtls
make
./micropython
Test code to craete a button and a label:
>>> import lvgl
>>> btn = lvgl.btn(lvgl.scr_act())
>>> btn.align(lvgl.scr_act(), lvgl.ALIGN.
>>> btn.align(lvgl.scr_act(), lvgl.ALIGN.CENTER, 0, 0)
>>> label = lvgl.label(btn)
>>> label.set_text("Button")
More info about LittlevGL:
Website https://littlevgl.com
GitHub: https://github.com/amirgon/lvgl
Discussiona about the Microptyhon binding: https://github.com/littlevgl/lvgl/issues/557More info about the unix port: https://github.com/micropython/micropython/wiki/Getting-Started#debian-ubuntu-mint-and-variants
离线
试了一下, 太棒了!
离线
不错不错,但我选择使用pyside2,绑定了python就失去lvgl的优势了,py下的gui库太多了
离线
不错不错,但我选择使用pyside2,绑定了python就失去lvgl的优势了,py下的gui库太多了
这是micropython的绑定,可以直接在单片机环境跑,不用上Linux,还是挺有价值的
离线
绑定lua 怎么样呢
离线
mark一下好啊
离线