I am using MicroPython v1.9.1 on my ESP32 Huzzah. The how-to guide says to upload several mpy files. When I "import motor" I get an error "incompatible .mpy file". Where do I go from here?
Thanks!
feather motor wing micropython huzzah ESP32
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- topher_cantrell
- Posts: 3
- Joined: Wed Jun 18, 2014 10:24 am
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: feather motor wing micropython huzzah ESP32
[moved to the MicroPython forum]
- danhalbert
- Posts: 4652
- Joined: Tue Aug 08, 2017 12:37 pm
Re: feather motor wing micropython huzzah ESP32
Hi - the .mpy files are pre-compiled versions of the .py files. They save space. In addition, a large .py file may be too big to be compiled on a board with limited RAM. However, the format of the .mpy files is different between some boards and also changes over time. You're using files on the ESP32 that were compiled for version 1.0.0 of CircuitPython. Also, our libraries are written for use with CircuitPython, which has some differences from MicroPython, mostly in the included libraries
The easiest thing to try is to just to replace the .mpy files with the corresponding original .py files. You can download a zip of of the source code (the .py files) from the releases page for the library: https://github.com/adafruit/micropython ... 5/releases. The ESP32 has plenty of memory and you probably don't need the .mpy files.
Note also that ESP32 port of MicroPython is a work in progress and you may run into other issues. We're not involved with that port, so you may need to consult with the original developers or that community.
The easiest thing to try is to just to replace the .mpy files with the corresponding original .py files. You can download a zip of of the source code (the .py files) from the releases page for the library: https://github.com/adafruit/micropython ... 5/releases. The ESP32 has plenty of memory and you probably don't need the .mpy files.
Note also that ESP32 port of MicroPython is a work in progress and you may run into other issues. We're not involved with that port, so you may need to consult with the original developers or that community.
- topher_cantrell
- Posts: 3
- Joined: Wed Jun 18, 2014 10:24 am
Re: feather motor wing micropython huzzah ESP32
Thank you so much for the great information!
Please be positive and constructive with your questions and comments.