lv_binding_micropython icon indicating copy to clipboard operation
lv_binding_micropython copied to clipboard

Micro python bindings on ubuntu machine

Open Riddhikavar opened this issue 1 year ago • 1 comments

Hi Folks,

I am trying to create a GUI application.

I want to use python to create GUI, I am working on device rock-pi-4

I encountered issues related to micropython bindings, I tried to check examples but getting usys module error, and no solutions for that.

I am trying to check this on ubuntu machine before testing it on device.

If any one can help me out here. How should I proceed further that will be a great help.

Thanks in advance!

Riddhikavar avatar Feb 13 '24 14:02 Riddhikavar

Hello! The device rock-pi-4 is a Linux based device, isn't it? If yes, then you can use Linux + SDL related drivers on it. See:

  • https://docs.lvgl.io/master/integration/ide/pc-simulator.html#install-sdl-2
  • https://github.com/lvgl/lv_binding_micropython/blob/master/examples/example1.py#L13

The usys module error is MicroPython related, you should use sys instead (and same for other builtin MicroPython modules: just remove the first letter "u" from the name).

Example of building "unix board" (for Ubuntu Linux and Linux based rock-pi-4):

cd lv_micropython
make -C mpy-cross

cd ports/unix
make submodules
make

PGNetHun avatar Feb 15 '24 09:02 PGNetHun