Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Stepper.h>
- const int stepsPerRevolution = 4076; // Quantos stepps para uma volta do motor
- //Inicializa a biblioteca utilizando as portas de 8 a 11 para ligacao ao motor
- Stepper myStepper(stepsPerRevolution, 8, 10, 9, 11);
- //------------------------------------
- void setup()
- {
- myStepper.setSpeed(1); // Determina a velocidade inicial do motor 1 RPM
- }
- //------------------------------------
- void loop()
- {
- myStepper.step(4076); // Gira o motor no sentido horario steps
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement