This repository has been archived on 2024-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
Arduino/sketch_sep09a.ino
2023-06-20 19:38:41 +03:00

20 lines
417 B
C++

#include <Stepper.h>
const int stepsPerRevolution = 1000; // change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
int stepCount = 0; // number of steps the motor has taken
void setup() {
// nothing to do inside the setup
}
void loop() {
myStepper.step(analogRead(A0)*10);
}