Jo highVoltage’s Automated Book Report

In this project Jo highVolatage shows how she uses her CPX, Crickit and a continuous servo to automate her book report.  The CPX is coded using CircuitPython.

 

This youTube video shows how the project was made:

Here is the code for the project:

Josie’s CPX Crickit continuous servo
BOOK REPORT
import time
import board
import digitalio
from adafruit_crickit import crickit
print(“1 Continuous Servo demo!”)
buttonA = digitalio.DigitalInOut(board.BUTTON_A)
buttonA.direction = digitalio.Direction.INPUT
buttonA.pull = digitalio.Pull.DOWN
buttonB = digitalio.DigitalInOut(board.BUTTON_B)
buttonB.direction = digitalio.Direction.INPUT
buttonB.pull = digitalio.Pull.DOWN
while True:
if buttonA.value:
print(“moving”)
crickit.continuous_servo_2.throttle = 0.07 # Forwards
time.sleep(1)

if buttonB.value:
print(“Stopped chu hav.”)
crickit.servo_2._pwm_out.duty_c

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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