Gemma M0 not enough memory

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
simdlx
 
Posts: 12
Joined: Thu Dec 09, 2021 7:10 pm

Gemma M0 not enough memory

Post by simdlx »

Hi,

in this thread viewtopic.php?f=52&t=175423&p=854775&hilit=ht16k33#wrap Dave suggested:
... to hack out as much of the ht16k33 library ...
But how?

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Gemma M0 not enough memory

Post by dastels »

There's bound to be some functionality you won't need. Figure out what you'll need and start commenting out things you don't. Be sure that what you need doesn't need it. It'll be a bit of work, to be sure. Some call graph analysis tools can help with that. See https://pycallgraph.readthedocs.io/en/master/.

Dave

User avatar
simdlx
 
Posts: 12
Joined: Thu Dec 09, 2021 7:10 pm

Re: Gemma M0 not enough memory

Post by simdlx »

Thank you for the fast reply, Dave!

After a quick research I learned that the ht16k33 lib is especially for a LED matrix. I thought this lib is a fat repository in circuitpython‘s core.

I am looking for a general way to get more space on the Gemma m0 board and thought about thinning the core out and using only the components I need for my project. For example, I don't need a windows driver or the audio stuff.

Background:

I‘m building the firewalker 2.0 project https://learn.adafruit.com/gemma-led-sneakers but with a Neopixel 24 ring RGBW instead of the Neopixel Strip.

I want to use the vibration sensor to trigger randomly led animations from https://github.com/adafruit/Adafruit_Ci ... _Animation But there not enough memory for even a single animation

Any recommendations?

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Gemma M0 not enough memory

Post by dastels »

Switch to a bigger board. Something SAMD51 (aka M4) based will work nicely. ItsyBitsy M4 Express https://www.adafruit.com/product/3800 or Feather M4 Express https://www.adafruit.com/product/3857 are good choices. Feather has battery support (including a charger) but ItsyBitsy is smaller... but you'll need to add a LiPo backpack https://www.adafruit.com/product/2124 to add battery connector and charger.

The other option is to switch to programming it in C++ (e.g. using Arduino).

Dave

User avatar
danhalbert
 
Posts: 4649
Joined: Tue Aug 08, 2017 12:37 pm

Re: Gemma M0 not enough memory

Post by danhalbert »

The RP2040 boards would probably also be fine.

User avatar
simdlx
 
Posts: 12
Joined: Thu Dec 09, 2021 7:10 pm

Re: Gemma M0 not enough memory

Post by simdlx »

Happy New Year and thank you for all the great suggestions.

After spending a couple of hours with the Arduino code I bought the ItsyBity M4 with a LiPo Backpack. :)

And this thing really rocks! my prototype is finished and it runs with all adafruit led animations.

I discovered an issue but for this, I'll open a separate thread.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”