arduino engine
Posted: Fri Dec 10, 2021 9:56 am
Hello,
I need help with my arduino step engine.
I need him to make steps in one way and after same number of steps in other way.
But after loading my code, the engine make some steps and after more or less steps on other way and I need it to be same.
Can you fix my code?
#include <Stepper.h>
#define STEPS 20380
(28BYJ-48)
Stepper stepper (STEPS, 8, 10,
9, 11):
void setup()
{
void loop() {
delay (8200);
stepper.setSpeed (1); // 1000 ot./min
stepper.step (+1000);
71 udělat 2038 kroků odpovídá jedné otáčke za minutu
stepper.setSpeed (1); // 1000ot./min
stepper.step(-1800);
delay (48000);
stepper.setSpeed (1); // 1000 ot./min
stepper.step(-1260);
stepper.setSpeed (1); // 1000 ot./min
stepper.step (+630);
delay (20000);
stepper.setSpeed (1); // 1000 ot./min
stepper.step (-1260);
stepper.setSpeed (1); // 1000 ot./min
stepper.step (+630);
delay (20000);
Thanks
I need help with my arduino step engine.
I need him to make steps in one way and after same number of steps in other way.
But after loading my code, the engine make some steps and after more or less steps on other way and I need it to be same.
Can you fix my code?
#include <Stepper.h>
#define STEPS 20380
(28BYJ-48)
Stepper stepper (STEPS, 8, 10,
9, 11):
void setup()
{
void loop() {
delay (8200);
stepper.setSpeed (1); // 1000 ot./min
stepper.step (+1000);
71 udělat 2038 kroků odpovídá jedné otáčke za minutu
stepper.setSpeed (1); // 1000ot./min
stepper.step(-1800);
delay (48000);
stepper.setSpeed (1); // 1000 ot./min
stepper.step(-1260);
stepper.setSpeed (1); // 1000 ot./min
stepper.step (+630);
delay (20000);
stepper.setSpeed (1); // 1000 ot./min
stepper.step (-1260);
stepper.setSpeed (1); // 1000 ot./min
stepper.step (+630);
delay (20000);
Thanks