Closed quanlotbangsat closed 1 year ago
For better understanding: Where is zeroservo()
called ? Inside loop()
or in setup()
?
I call it throught serial.
not clear. Could you please provide more of your code ?
There are calls to loop()
within this function. This smells like a recursive use of loop()
, which may cause all sorts of side effects.
Hi gin66, thank you so much for your lib.
But i have issue when using mega 2560, first it maximum 1000hz if i using your 30.4 library, So i must using 28.4
On 28.4, I don't know why when i change speed the distance will diffirent. When the speed is slow the distance go longer. The code using Zero like this and moveto: bool zeroservo(FastAccelStepper servo, ServoMM servodata, byte zerosensor, float speed) { bool done; if (!servo->isRunning()) { if (digitalRead(zerosensor)) { servo->setSpeedInHz(speed); servo->move(-1000000); onzero = true; } else goto d;
}
Pls support me