CPX and Crickit

This is a special forum devoted to educators using Adafruit and Arduino products for teaching.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Hapka
 
Posts: 89
Joined: Fri Jul 03, 2015 10:52 pm

CPX and Crickit

Post by Hapka »

I feel like I am missing something obvious.

We are using circuitplayground expresses with crickits and the red metal adafruit chasses with dc motors in servo cases (2939). The crickit is powered by a 3 pack of AA's. I am connecting to the CPX and not the USB on the crickit. The switch on the crickit is switched to on.

I reflashed the uf2 on all the CPX's (they get used a lot so wanted to start fresh) and added just the libraries we want to use. The kids encounter a few issues (its been about a year since I had the crickits out and know these are something silly but can't figure them out):

1. The CPX works great when not on the crickit, but pretends like it doesn't work when mounted. (I tested them with just some blinking neopixels and musical entertainment.) I check to make sure the standoffs and screws are all in the right positions, really seems like something is connected somewhere it shouldn't be. The board does show up as circuitpy, and the main.py file can be opened but the old blinky program is still running on the board even though main.py doesn't have any blinky commands. Here's the code:

----------
from adafruit_crickit import crickit

while True:
print("starting loop...")
crickit.dc_motor_1.throttle = 0.9
crickit.dc_motor_2.throttle = 0.9
-----------
Here's the error:

>>> %Run main.py
Traceback (most recent call last):
File "D:\main.py", line 2, in <module>
from adafruit_crickit import crickit
ModuleNotFoundError: No module named 'adafruit_crickit'

---------
I am using Thonny sometimes and Mu sometimes, both give the same error.


2. One setup was working great, but reverted back to the same error when the student decided to "mod" his setup (which means tieing down the battery case).

I feel like I'm missing something super basic here.

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: CPX and Crickit

Post by dastels »

Did you use the CPX+Crickit UF2? There isn't enough RAM to (reliably) use a Crickit library in CIRCUITPY/lib; it has to be frozen into the runtime (i.e. stored in flash, not ram).

Dave

User avatar
Hapka
 
Posts: 89
Joined: Fri Jul 03, 2015 10:52 pm

Re: CPX and Crickit

Post by Hapka »

Yeah that was it! Robots are driving around happily again!

The circuitplayground, crickit, and chasses are all super durable, I'm really impressed with how well they suffer through so many student uses!

Locked
Please be positive and constructive with your questions and comments.

Return to “For Educators”