Jo highVoltage Gingerbread Pond with CPX, Crickit & CircuitPython

Jo highVoltage made a Gingerbread Pond where a gingerbread skater spins in the middle when a button on the CPX is pressed.  A DC motor is under the pond and is attached to a skateboard bearing which is attached to a piece of PVC board that is cut in a circle.  Using CircuitPython the CPX/Crickit is programmed to make the motor turn causing the skater to “spin”.


The code is below:

from import cpx
from adafruit_crickit import crickit
import time
import audioio
import board

motor_1 = crickit.dc_motor_1

wave_file = open(“jb.wav”, “rb”)
wave = audioio.WaveFile(wave_file)
audio = audioio.AudioOut(board.A0)

while True:
if cpx.button_a:
print(“button a was pushed”)
motor_1.throttle = -0.30

if cpx.button_b:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s