Customer:
I’m trying to use the micropython library on the e-paper display, but my main file can’t resolve imports from other files. It says it can’t find the module to import. I’ve confirmed all necessary files are in the same folder on the ESP32. I’ve flashed the micropython image multiple times, and tried multiple different ways to import in Python, but nothing has worked.
Originally submitted via email support on 20 July 2023. Migrated to the forum for community visibility.
Soldered Support:
Did you perhaps skip the step where you have to copy the required files to the Inkplate? Check step #5 in the micropython README on the repository: GitHub - SolderedElectronics/Inkplate-micropython: MicroPython driver for Soldered Inkplate devices · GitHub
That step contains a list of all the .py files to be copied to Inkplate. If your main file can’t resolve the imports, they likely haven’t been copied. Make sure to copy all the files you want to import in your sketch.
Customer:
I definitely followed all steps on your GitHub page. I verified via pyboard.py -f ls that the correct files were uploaded to the ESP32.
Soldered Support:
That’s strange - I just tried to recreate this issue.
I’m on Windows with the latest version of the Inkplate library. I also have a Soldered Inkplate 6PLUS.
These are the steps I took:
- Opened terminal in the Inkplate Micropython folder. I ran
esptool.py --port COM13 erase_flash to erase the Arduino firmware currently on Inkplate 6PLUS.
- I then ran
esptool.py --chip esp32 --port COM13 write_flash -z 0x1000 -v1.18.bin to copy the micropython firmware. It was successful and took about a minute.
- Then I ran
pyboard.py --device COM13 -f cp soldered_inkplate6_PLUS.py gfx.py gfx_standard_font_01.py PCAL6416A.py image.py shapes.py soldered_logo.py : to copy all the required files. I had to run this command twice - this is expected due to a random bug in esptool.py.
- I then ran
pyboard.py --device COM13 "Examples/Soldered_Inkplate6PLUS/basicBW.py" and this example ran on the first try.
It’s possible you have the older Inkplate 6PLUS version rather than the newer Soldered Inkplate 6PLUS. The difference is important. Check this page on the wiki for what the difference is: Inkplate Arduino — Inkplate docs documentation
If you have the newer one, try with ‘Soldered Inkplate6PLUS’ and copy the PCAL expander. For the older one use the regular Inkplate6PLUS and copy the MCP expander. Before trying, please erase the flash again to make sure we have a fresh start and no older file is causing conflicts.