You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Esp8266 based board has not enough RAM to load the module #17
When I tried from max30102 import MAX30102, always got importError: no module named 'max30102.MAX30102'
dir as below:
lib
-max30102
--circular_buffer.py
--init.py
I also tried from max30102.init import MAX30102, got another error:
Traceback(most recent call last):
File"", line1, in
MemoryError: memory allocation failed,allocating 416 bytes
Hi,
which board are you using? And which tools are you using to copy the files on it?
You can also attach some screenshots if you want.
Also, post the code you're trying to execute, please!
Thanks for your quick reply.
I am using esp8266
And installed the driver as Thonny IDE plug-in, I also tried to install it directly to the board, and got the same issue.
from max30102 import MAX30102
Traceback (most recent call last):
File "", line 1, in
ImportError: no module named 'max30102'
Hi,
did you install the latest (v0.4.1) version?
Are you absolutely sure that the files have been correctly written onto non-volatile memory? It seems like it cannot find the file.
May you provide a wifi internet connection to your board? If so, can you try the example suggested in the readme here ?
Remember to reset the board (Ctrl-D in Thonny) and let it run boot.py and main.py, do not play your scripts directly from Thonny.
The online installation works fine, so if you will get the memory error, then it means that you have not enough RAM on your board to run this driver, and you could try to precompile or frozen the driver or try to write a lighter one on your own.
Trying to connect to the Internet to download the module.
network config: ('192.168.1.216', '255.255.255.0', '192.168.1.1', '192.168.1.98')
Installing to: /lib/
Error installing 'micropython-max30102': memory allocation failed, allocating 15685 bytes, packages may be partially installed
changed the title [-]installed the driver for thonny but not able to import MAX30102[/-][+]Esp8266 based board has not enough RAM to load the module[/+]on Dec 10, 2022
Repository owner locked and limited conversation to collaborators on Dec 10, 2022
Activity
n-elia commentedon Dec 5, 2022
Hi,
which board are you using? And which tools are you using to copy the files on it?
You can also attach some screenshots if you want.
Also, post the code you're trying to execute, please!
Cinmay2014 commentedon Dec 5, 2022
Thanks for your quick reply.
I am using esp8266
And installed the driver as Thonny IDE plug-in, I also tried to install it directly to the board, and got the same issue.
n-elia commentedon Dec 5, 2022
Hi,
did you install the latest (v0.4.1) version?
Are you absolutely sure that the files have been correctly written onto non-volatile memory? It seems like it cannot find the file.
May you provide a wifi internet connection to your board? If so, can you try the example suggested in the readme here ?
Cinmay2014 commentedon Dec 5, 2022
Yes, I installed the latest version.
I tried the manual way and got a memory error.
I will try the wifi-enable method and let you know the result.
n-elia commentedon Dec 6, 2022
Ok, try that way.
Remember to reset the board (Ctrl-D in Thonny) and let it run boot.py and main.py, do not play your scripts directly from Thonny.
The online installation works fine, so if you will get the memory error, then it means that you have not enough RAM on your board to run this driver, and you could try to precompile or frozen the driver or try to write a lighter one on your own.
Let me know what happens!
Cinmay2014 commentedon Dec 7, 2022
Tried it and got the error:
Trying to connect to the Internet to download the module.
network config: ('192.168.1.216', '255.255.255.0', '192.168.1.1', '192.168.1.98')
Installing to: /lib/
Error installing 'micropython-max30102': memory allocation failed, allocating 15685 bytes, packages may be partially installed
Can you tell me how to frozen the driver?
n-elia commentedon Dec 10, 2022
Hi,
Then your board has not enough RAM to load the library.
Take a look here for instructions on freezing modules.
[-]installed the driver for thonny but not able to import MAX30102[/-][+]Esp8266 based board has not enough RAM to load the module[/+]