Skip to content

Instantly share code, notes, and snippets.

@marianri
marianri / pwm_stepper_control.ino
Created January 10, 2019 14:45 — forked from yosemitebandit/pwm_stepper_control.ino
controlling a stepper motor with PWM
/* Teensy LC sketch for controlling a stepper motor.
Reads comma-separate commands over serial. Sends back number of steps taken.
Commands are of the form:
step,300,800 -> stepper should move 300 sixteenth-steps forward at 800 steps per second
step,-124,100 -> stepper should move 124 sixteenth-steps backward at 100 steps per second
*/