Closed JohannaE closed 2 years ago
Some M0 boards are limited in memory, so this possible the main of your problem. Please see this https://learn.adafruit.com/Memory-saving-tips-for-CircuitPython There are some hacking to do in the libraries themselves. please see https://github.com/adafruit/Adafruit_CircuitPython_DPS310/pull/15. If you want to discuss more about this please feel free to comment in the Discor channel #help-with-circuitpython
Thanks.
Closing. I think this a known issue of dealing with limited memory space. So not really an issue specific to this library.
The CPX is an M0 based board. The adafruit_circuitplayground.express
is also fairly large, so is likely taking up most of the post. If you aren't using many of the CPX's features, you can try not using the adafruit_circuitplayground.express
library and then manually setup of those things you are using, like NeoPixels.
Code is working without including
adafruit_circuitplayground.express
:As you can see in the output only 4752 bytes are free after importing
import adafruit_ltr390
:The code to measure free memory:
Without including anything and measuring the free memory the circuit playground express has 19648 bytes free.
The code which includes the
adafruit_ltr390
toghter with theadafruit_circuitplayground.express
libraries:As a result of including both libraries the memory allocation failes:
The problem is that I cannot use any other funcionalty of my board in combination with the ltr390 uv sensor. I don`t unterstand why the ltr390 library causes the memory allocation failure.
My usecase involves visualizing the uv index value using the neo pixels and speakers. Because of the memory failure I can only use either the neo pixels + sound or the ltr390 uv sensor.