0

Mem Allocation Fails on Itsy Bitsy M0 Express
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Mem Allocation Fails on Itsy Bitsy M0 Express

by sommersoft on Thu Mar 29, 2018 9:22 am

Einstein007,

Woohoo!! Glad its working for you now. Enjoy your week/weekend as well!

sommersoft
 
Posts: 20
Joined: Sun Aug 14, 2016 10:43 pm

Re: Mem Allocation Fails on Itsy Bitsy M0 Express

by adafruit_support_carter on Thu Mar 29, 2018 10:04 am

@sommersoft Well done. I was thinking down a different path than just .py vs. .mpy. Nice catch and thanks for helping!

@Einstein007 Woot. Glad it's working!

adafruit_support_carter
 
Posts: 21061
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mem Allocation Fails on Itsy Bitsy M0 Express

by Einstein007 on Thu Mar 29, 2018 10:08 am

adafruit_support_carter, thank you for all the support. I really appreciate everyone's help solving this problem. I learned a lot and it will help me play with the toys in the future. Adafruit is #1!

Einstein007
 
Posts: 13
Joined: Sun Mar 18, 2018 5:44 pm

Re: Mem Allocation Fails on Itsy Bitsy M0 Express

by kenidowa on Mon Apr 16, 2018 11:19 pm

Rather than post a new subject I am going to tag on to this thread. I have a Trinket MO and just recently purchased an ItsyBitsy MO. I tried running a program from the Trinket on the ItsyBitsy and run into a consistent error on the IB(ItsyBitsy) .
File" /lib/adafruit_character_lcd/_init_.py", line 2, in <module>
MemoryError: memory allocation failed, allocating 179 bytes.
This seems to be associated only with the adafruit_character_lcd library. It can be duplicate with the "charlcd_I2C_simpletest" program in the examples folder. This seems strange since the Trinket MO is so much smaller but is works fine but the IB with over 2MB of memory has the memory error.
I have tried different programs using this lib and as soon as it hits the import statement of it I get this error. Any thoughts?

kenidowa
 
Posts: 41
Joined: Wed Nov 07, 2012 7:50 pm

Re: Mem Allocation Fails on Itsy Bitsy M0 Express

by sommersoft on Tue Apr 17, 2018 1:17 am

but the IB with over 2MB of memory has the memory error


The 2MB is flash storage; not memory. The ItsyBitsy has the same on-chip RAM as the Trinket.

Much like the earlier discussion in this thread, I see your memory error states .py. I would try using the .mpy versions of the libraries. Bundle Releases

If that doesn't get you past the memory error, you could try using firmware 3.0.0-alpha. It is still in development, but it includes some heap management stuff that aims to alleviate some of this (not all; RAM is finite).

If you don't want to try the 3.x-alpha, let us know and we can dig deeper.

sommersoft
 
Posts: 20
Joined: Sun Aug 14, 2016 10:43 pm

Re: Mem Allocation Fails on Itsy Bitsy M0 Express

by adafruit_support_carter on Tue Apr 17, 2018 11:11 am

@kenidowa In the future, please do start a new topic. If you think this (or some other topic) is useful and relates, then you can just link to it from your thread.

For your question - @sommersoft 's response is excellent.

adafruit_support_carter
 
Posts: 21061
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mem Allocation Fails on Itsy Bitsy M0 Express

by kenidowa on Thu Apr 19, 2018 12:11 am

ok before your response I did find a newer i guess version of the lib that was mpy and it seems to work. I do feel the ItsyBitsy is not as well documented as the Trinket MO. I am currently experimentally figuring out the touch sensitive pins. I haven't found documentation that adequately describes all the pin functionlilty.

kenidowa
 
Posts: 41
Joined: Wed Nov 07, 2012 7:50 pm

Please be positive and constructive with your questions and comments.