Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory allocation problem with Raspberry pico w #27

Open
Patxi080 opened this issue Jun 4, 2024 · 2 comments
Open

Memory allocation problem with Raspberry pico w #27

Patxi080 opened this issue Jun 4, 2024 · 2 comments

Comments

@Patxi080
Copy link

Patxi080 commented Jun 4, 2024

I wanted to use the library in a project but when when the library sx1262 is imported this error happens:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/lib/sx1262.py", line 2, in <module>
MemoryError: memory allocation failed, allocating 176 byte

I created a new file to check if it was the library with only:
import sx1262
And it keeps happening.
Here is an image:
image

@ehong-tl
Copy link
Owner

ehong-tl commented Jun 5, 2024

Hi,

This could be due to insufficient RAM in Pico W than in standard Pico.

One thing you can try is to compile the library into .mpy bytecode.

Sorry that I can't give you a complete solution as I have no experience in using Pico / Pico W.

@Ruben0595
Copy link

sx1262_mpy_lib.zip

Here are mpy files of the library. just replace the current sx1262/126x .py files with these and should work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants