Page 1 of 1

Stacking featherwings boards

Posted: Wed Jul 26, 2023 11:16 am
by samu_flavio
Hello Guys, sorry if my questions looks so much beginner.

I am trying to stack 28 feathers (ones like these https://www.adafruit.com/product/2927) using an Arduino Uno to control 56 steppers motors. The issue is that in certain point the number of objects called by the method of AdafruitMotorShield_v2 library is so big that the code is uncapable of upload due the memory error.
So, I change my perspective and start to declare these objects each interaction of a loop that change the featherwing memory each time and for that I have to change a parameter of the library from private to public (_addr variable). Now I realize that the code works but in a certain point of the loop my motors just stopped. I also try to create a method inside of the library to change this same variable, but the behavior was the same. And the reason for this, I believe is that I'm creating a lot of objects and when I achieve a certain number my Arduino is unable to continuous.

So after all of this, my question is, is there any method capable of delete the objects generated by the call of AdafruitMotorShield and Adafruit_StepperMotor classes in each loop interaction? Or any other idea how to resolve this problem?

Re: Stacking featherwings boards

Posted: Wed Jul 26, 2023 12:38 pm
by adafruit_support_carter
Wow - that's quite the FeatherWing stack! Impressive.

Is the UNO your only Arduino board? Using a more modern Arduino board with more memory could be one possible easy solution.

Re: Stacking featherwings boards

Posted: Thu Jul 27, 2023 1:50 pm
by samu_flavio
For now, I don't have, possibly I will have to by another one. But I would like to try another solution.
Thank you for your response.