User Manual
My code gives the following error in the REPL/Serial window:
The code from adafruit_crickit import crickit always throws
Traceback (most recent call last):
File "code.py", line 1, in
File "adafruit_crickit.py", line 66, in
MemoryError: memory allocation failed, allocating 152 bytes
CircuitPython will pull in libraries from /lib on the device before looking for any "baked in" ("Frozen" libraries) in the
main CircuitPython code. If you are using, for example, the Circuit Playground Express + Crickit build of CircuitPython
and you also have the adafruit_crickit and/or adafruit_seesaw libraries in /lib, CircuitPython will load the /lib version
and still have the frozen version in memory. Your program will quickly run out of memory on the Circuit Playground
Express.
The fix is fairly easy. Only put the libraries you need in the /lib folder of your CIRCUITPY drive. For Crickit, use the
special Crickit builds of CircuitPython and be sure that the libraries adafruit_crickit and adafruit_seesaw are not in
your /lib folder. You still have that functionality, but they are already loaded due to the special build.
© Adafruit Industries
https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-
construction-kit
Page 196 of 201










