I have tried to get around this by precompiling the module using the cross-compiler as suggested by pythoncoder.
http://forum.micropython.org/viewtopic. ... 876#p10542
This is what i have done:
cd into mpy-cross
running make in this directory
running the resulting ./mpy-cross binary to compile the BME280.py module to BME280.mpy
I have gotten it downloaded to flash as BME280.mpy
When i now get this error when i try to import it:
Code: Select all
PYB: soft reboot could not open file 'main.py' for reading MicroPython v1.8-21-g9e47c14-dirty on 2016-05-08; ESP module with ESP8266 Type "help()" for more information. >>> ls() ['boot.py', 'port_config.py', 'BME280.mpy', 'util.py', 'wlanconnect.py', 'file', 'BMP1801.py', 'test.py', 'testget.py'] >>> import BME280 Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: no module named 'BME280'
This approach does not seem to work by now.
I increased heap size and the import worked.
The board with BME280 sensor is deployed in the basement and is reporting the measurements via mqtt to my openhab server.
The measurement are collected into a mongodb collection for later analysis.