User Manual

Move the Motor Port Stepper One Direction Forever
Here is a simple program that tells the stepper to move 20 steps, then wait 10 milliseconds, and repeats forever:
You'll see the motor shaft slowly turning in the "positive" direction. If you use a bit of solid tape on the stepper's shaft as
a small flag, you can see the rotation better. If the rotation is in the wrong direction, use a negative value for the
number of steps, re. -20 .
At this point, you can vary the parameters: increase or decrease the number of steps moved every loop. If you want the
stepper to move faster, increase the steps. This may make the action a bit "jerky". If so, you can decrease the steps.
This will be smooth, but slow. To increase the pause between steps, you can use the pause block to get times greater
than 10 milliseconds.
Using a Stepper on the Drive Port in MakeCode
In the CRICKIT block group, scroll down until you see the Stepper heading and the block crickit drive stepper move
block.
© Adafruit Industries
https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-
construction-kit
Page 68 of 201