micropython-IMU / micropython-mpu9x50

Drivers for InvenSense inertial measurement units MPU9250, MPU9150, MPU6050
MIT License
260 stars 82 forks source link

"MemoryError:" when trying to run it on an ESP8266 NodeMCU breakout #12

Closed Thalaivar closed 7 years ago

Thalaivar commented 7 years ago

How can I get over this error?

peterhinch commented 7 years ago

The approach to running large modules on RAM limited devices is to use frozen bytecode. Put the MicropPython modules into ports/esp8266/modules in the source tree. Then rebuild the firmware and install. This causes the MicroPython code to be compiled to bytecode on the PC; on installation the bytecode is stored in Flash.

Thalaivar commented 7 years ago

Thanks for your reply! However I'm a newb when it comes to uPy. Till now, to install the firmware, I've been directly using esptool.py and the bin files from the micropython downloads page. How do I rebuild and install the firmware as you mentioned?

peterhinch commented 7 years ago

A starting point might be to read the build document.

General questions are best raised in the forum. GitHub issues are intended for bug reports.