11 lines
298 B
Python
11 lines
298 B
Python
# Crickit library demo - DC motor
|
|
|
|
import time
|
|
from adafruit_crickit import crickit
|
|
|
|
# Run motor on Motor 1 terminals forward at full speed and then backward at half speed.
|
|
while True:
|
|
crickit.dc_motor_1.throttle = 1.0
|
|
time.sleep(1)
|
|
crickit.dc_motor_1.throttle = -0.5
|
|
time.sleep(1)
|