Sample Script
#!/usr/bin/python
import time
import board
from adafruit_motorkit import MotorKit
from adafruit_motor import stepper
kit = MotorKit(i2c=board.I2C())
for i in range(54):
# kit.stepper1.onestep(style=stepper.SINGLE,direction=stepper.BACKWARD)
kit.stepper1.onestep(style=stepper.DOUBLE)
# time.sleep(.01)
#for i in range(864):
# kit.stepper1.onestep(style=stepper.MICROSTEP,direction=stepper.BACKWARD)
# kit.stepper1.onestep(style=stepper.MICROSTEP,direction=stepper.FORWARD)
kit.stepper1.release()
Setup And Installation
- Start by casting on waste yarn, following knitting machine instructions
- After ~10 rows, ran script to perform one day's knitting, to catch up to current day:
#!/usr/bin/python
import time
import board
from adafruit_motorkit import MotorKit
from adafruit_motor import stepper
kit = MotorKit(i2c=board.I2C())
steps = (2220)
for i in range(steps):
kit.stepper1.onestep(style=stepper.DOUBLE,direction=stepper.FORWARD)
kit.stepper1.release()