Hi all,
I wonder if anyone can help. I'm new to micropython but from a programming background. I'm trying to get Peter Hinch's nano-gui working on my pi pico with this 2.8 screen from Waveshare: https://www.waveshare.com/wiki/Pico-ResTouch-LCD-2.8
I have 'Hello world' working from the examples. I have cloned the nano-gui to PC and copied the files to appropriate places on the pi, retaining the tree structure. When I try the demo files, eg, color15.py I'm getting a 'memory allocation failed, allocating 232 bytes'.
I checked mem_free() before running the module: 179,184. After the error, 16,176.
It's a minimal copy of files to the pico, just the relevant driver, device setup file, core, widgets and 2 fonts. Can anyone shed any light on it?
Cheers
Andrew
Memory allocation error with nanogui and Waveshare 2.8 Pico Res
-
- Posts: 1
- Joined: Sat Aug 13, 2022 11:57 am
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Memory allocation error with nanogui and Waveshare 2.8 Pico Res
I assume you're using the ws_pico_res_touch.py setup, renamed to color_setup.py on the target. I have just run the color15.py test and it runs to completion. I modified it to display free RAM after each test and in each case it reported > 100KiB free.
So I'm baffled how we can run the same test on the same hardware with such different results. Are you sure you haven't modified color15.py in some way?
So I'm baffled how we can run the same test on the same hardware with such different results. Are you sure you haven't modified color15.py in some way?
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.