Page 1 of 1

Memory allocation error with nanogui and Waveshare 2.8 Pico Res

Posted: Sat Aug 13, 2022 12:30 pm
by webbandrew
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

Re: Memory allocation error with nanogui and Waveshare 2.8 Pico Res

Posted: Sun Aug 14, 2022 8:28 am
by pythoncoder
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?