You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please add overload method to allow for easing in the ::move method of the library.
I tried an overload method for the ::move function in the libary.
I tried it myself, but it's not working :).
//void ALLBOT::move(int servo, int angle, int start, int duration)
BOT.move(hipFrontLeft,10,45,100);
// start: beginning value,angle: change in value, duration
void ALLBOT::move(int servo, int angle, int start, int duration)
{
for (int pos=start; pos<duration; pos++){
//move servo from 0 and 140 degrees forward
int moveValue = angle*(pos/=duration)pospos + start;
Serial.println("moving to angle" + moveValue);
_servo[servo].move(moveValue);
_servo[servo].tick();
delay(15); //wait for the servo to move
}
//_servo[servo].move(angle);
}
Please add overload method to allow for easing in the ::move method of the library.
I tried an overload method for the ::move function in the libary.
I tried it myself, but it's not working :).
//void ALLBOT::move(int servo, int angle, int start, int duration)
BOT.move(hipFrontLeft,10,45,100);
// start: beginning value,angle: change in value, duration
void ALLBOT::move(int servo, int angle, int start, int duration)
{
for (int pos=start; pos<duration; pos++){
//move servo from 0 and 140 degrees forward
int moveValue = angle*(pos/=duration)pospos + start;
Serial.println("moving to angle" + moveValue);
_servo[servo].move(moveValue);
_servo[servo].tick();
delay(15); //wait for the servo to move
}
//_servo[servo].move(angle);
}
(Based on https://github.com/tobiastoft/ArduinoEasing)
The text was updated successfully, but these errors were encountered: