I'm back with more problems!
I've trying to write a file_launcher programme so I can open different programmes with my Pi Pico using a 1.3" LCD screen.
I'm getting memory allocation error when trying to launch my files. I don't think my code in the file_launcher is crucial, but this is the command I'm using:
Code: Select all
exec(open(filename).read())
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 300, in <module>
File "<stdin>", line 278, in launch
File "<string>", line 161, in <module>
File "<string>", line 29, in __init__
MemoryError: memory allocation failed, allocating 115200 bytes
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 300, in <module>
File "<stdin>", line 278, in launch
File "<string>", line 13, in <module>
File "lcd_driver.py", line 28, in __init__
MemoryError: memory allocation failed, allocating 115200 bytes
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 300, in <module>
File "<stdin>", line 278, in launch
MemoryError: memory allocation failed, allocating 612 bytes
And of course they all work fine if launched from scratch, just not via a shell that is my file_launcher.
Is there a better way of doing this? Or have I done something wrong? Perhaps I've loading the LCD driver twice by launching it via a shell?