Why did you misspell "Cricket"?

We wanted a unique name, inspired by the original Cricket robotics platform from MIT (which then became the PicoCricket), but not with the exact same name!

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.

This guide was first published on Dec 14, 2018. It was last updated on Jun 16, 2024.

This page (F.A.Q.) was last updated on Mar 08, 2024.

Text editor powered by tinymce.