I am using an M5stack and I am trying to flash it with https://github.com/littlevgl/lv_micropython.
I was able to flash it and use Micropython via REPL but I am not able to use the screen, no image ever… As anyone managed to do this? Being looking for ages and can’t find a solution…
I have changed the ili9341.py driver to use the M5stack pins but I am not sure about the power one, can’t find what I am supposed to use there.
As anyone done this before that can give me a little help?
Thank you in advance!
Yes, some people are using it with M5stack. See this issue:
I’m not sure M5Stack has a power switching pin for the lcd. You can set it to -1 if it’s unused.
If you need help with your code, please post your code.
It’s best to provide a link to your git repo (in GitHub or GitLab).
Thank you so much! @amirgon
Your help was enough for me to not give up and finally managed to make my screen work!
You have made my day ahah.
Could you share with us how you configured the driver? This can be useful for others who might want to use M5stack with LittlevGL.
Sure! I’ll do that. I might even do a little guide with step by step from scratch (from compiling to first functional test) just need a bit of time.
But for now I’ll leave here what are the settings that one should hardcode in /lv_micropython/lib/lv_bindings/driver/esp32/ili9341.py (or pass when initializing the driver):
def __init__(self, miso=19, mosi=23, clk=18, cs=14, dc=27, rst=33, backlight=32,power=-1,power_on=-1, backlight_on=1, spihost=esp.HSPI_HOST, mhz=40, factor=4, hybrid=True, width=320, height=240, colormode=COLOR_MODE_BGR, rot=MADCTL_ML, invert=True, double_buffer=False )
If someone tries this and does not work let me know and i’ll try to help.
PS: Not sure about the double_buffer and the factor settings, first time using this lcd and drivers… if someone have any insight about it let me know.
Also, I have only done small tests yet, image is ok until now, so not sure about more advanced functions, but i’ll report if I find any problem