Arduino SAMD Boards in the Arduino Board Manager.5. Testing and AdjustmentCpp
#include <Stepper.h> const int stepsPerRevolution = 200; // Change this to match your stepper motor Stepper myStepper(stepsPerRevolution, 2, 3, 4, 5); void setup() { myStepper.setSpeed(60); // Set the speed to 60 RPM } void loop() { myStepper.step(stepsPerRevolution); delay(1000); myStepper.step(-stepsPerRevolution); delay(1000); }
ABX00027 Template
deucebot22