todbot / ServoEaser

Arduino library for servo easing
73 stars 18 forks source link

Operate Multiple Servos #5

Closed ghost closed 3 years ago

ghost commented 5 years ago

Hi ! How are you? I'm trying use your library with multiple servos (actually are 4), but i'm getting some trouble because in sometimes it begins to jittering any suggestion ?

KM6TCC commented 5 years ago

Perhaps I can give you a hand.. I've used it and it works just great... at what point does the jitter start and is it on all servos?? and which GPIO's are you using?

ghost commented 5 years ago

Perhaps I can give you a hand.. I've used it and it works just great... at what point does the jitter start and is it on all servos?? and which GPIO's are you using?

Oh, Thanks !!!! I'm using GPIO 4,5,6,7 Arduino Mega, yeah its in all servos, based on the example "MoveList, i just would like move the servos smoothly based on a list of movements, maybe two list and flip the other two servos.

KM6TCC commented 5 years ago

ok.. try 8,9,10,11 I had that issue a while back. and does it happends on all servos?

On Mon, Oct 15, 2018 at 2:26 PM KidMustard notifications@github.com wrote:

Perhaps I can give you a hand.. I've used it and it works just great... at what point does the jitter start and is it on all servos?? and which GPIO's are you using?

I'm using GPIO 4,5,6,7 Arduino Mega

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/todbot/ServoEaser/issues/5#issuecomment-430019559, or mute the thread https://github.com/notifications/unsubscribe-auth/ACnJC9Wu1y9SvtH51KobhhwSxjfioqOcks5ulP2KgaJpZM4XdJr1 .

KM6TCC commented 5 years ago

also what type of power supply are you using?..

On Mon, Oct 15, 2018 at 2:30 PM Marcelo Pekermann totibross@gmail.com wrote:

ok.. try 8,9,10,11 I had that issue a while back. and does it happends on all servos?

On Mon, Oct 15, 2018 at 2:26 PM KidMustard notifications@github.com wrote:

Perhaps I can give you a hand.. I've used it and it works just great... at what point does the jitter start and is it on all servos?? and which GPIO's are you using?

I'm using GPIO 4,5,6,7 Arduino Mega

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/todbot/ServoEaser/issues/5#issuecomment-430019559, or mute the thread https://github.com/notifications/unsubscribe-auth/ACnJC9Wu1y9SvtH51KobhhwSxjfioqOcks5ulP2KgaJpZM4XdJr1 .

ghost commented 5 years ago

ok.. try 8,9,10,11 I had that issue a while back. and does it happends on all servos? On Mon, Oct 15, 2018 at 2:26 PM KidMustard @.***> wrote: Perhaps I can give you a hand.. I've used it and it works just great... at what point does the jitter start and is it on all servos?? and which GPIO's are you using? I'm using GPIO 4,5,6,7 Arduino Mega — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#5 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/ACnJC9Wu1y9SvtH51KobhhwSxjfioqOcks5ulP2KgaJpZM4XdJr1 .

Yeah ! Here its my Code

include

include "ServoEaser.h"

/ Servo setup / int servoFrameMillis = 20;

const int servo1Pin = 8; const int servo2Pin = 9; const int servo3Pin = 10; const int servo4Pin = 11;

Servo ring1,ring2,ring3,ring4;

ServoEaser ring1Easer, ring2Easer, ring3Easer, ring4Easer;

ServoMove movesList1[] = { { 10, 15000}, {170, 15000}, { 10, 15000}, {170, 15000}, { 90, 15000}, { 90, 15000}, // 90 {135, 15000}, { 45, 15000}, {135, 15000}, }; int movesCount = 9; ServoMove* ring1Moves = movesList1;

void setup() {

Serial.begin(19200);

ring1.attach(servo1Pin); ring2.attach(servo2Pin); ring3.attach(servo3Pin); ring4.attach(servo4Pin);

ring1Easer.begin(ring1, servoFrameMillis); ring2Easer.begin(ring2, servoFrameMillis); ring2Easer.setFlipped(true); //ring3Easer.begin(ring3, servoFrameMillis); //ring4Easer.begin(ring4, servoFrameMillis);

//ring1Easer.useMicroseconds(true); ring1Easer.play( ring1Moves, movesCount); //ring2Easer.play( ring1Moves, movesCount);

}

void loop() { ring1Easer.update(); ring2Easer.update();

}

ghost commented 5 years ago

also what type of power supply are you using?.. On Mon, Oct 15, 2018 at 2:30 PM Marcelo Pekermann totibross@gmail.com wrote: ok.. try 8,9,10,11 I had that issue a while back. and does it happends on all servos? On Mon, Oct 15, 2018 at 2:26 PM KidMustard @.***> wrote: > Perhaps I can give you a hand.. I've used it and it works just great... > at what point does the jitter start and is it on all servos?? > and which GPIO's are you using? > > I'm using GPIO 4,5,6,7 Arduino Mega > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <#5 (comment)>, > or mute the thread > https://github.com/notifications/unsubscribe-auth/ACnJC9Wu1y9SvtH51KobhhwSxjfioqOcks5ulP2KgaJpZM4XdJr1 > . >

Cotek GE-25-05 (5V) 5A

KM6TCC commented 5 years ago

try this code.. is based pretty much on the same function let me know what you think

On Mon, Oct 15, 2018 at 2:33 PM KidMustard notifications@github.com wrote:

ok.. try 8,9,10,11 I had that issue a while back. and does it happends on all servos? … <#m3020145682435326210> On Mon, Oct 15, 2018 at 2:26 PM KidMustard @.***> wrote: Perhaps I can give you a hand.. I've used it and it works just great... at what point does the jitter start and is it on all servos?? and which GPIO's are you using? I'm using GPIO 4,5,6,7 Arduino Mega — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#5 (comment) https://github.com/todbot/ServoEaser/issues/5#issuecomment-430019559>, or mute the thread https://github.com/notifications/unsubscribe-auth/ACnJC9Wu1y9SvtH51KobhhwSxjfioqOcks5ulP2KgaJpZM4XdJr1 .

Yeah ! Here its my Code

include

include "ServoEaser.h"

/ Servo setup / int servoFrameMillis = 20;

const int servo1Pin = 8; const int servo2Pin = 9; const int servo3Pin = 10; const int servo4Pin = 11;

Servo ring1,ring2,ring3,ring4;

ServoEaser ring1Easer, ring2Easer, ring3Easer, ring4Easer;

ServoMove movesList1[] = { { 10, 15000}, {170, 15000}, { 10, 15000}, {170, 15000}, { 90, 15000}, { 90, 15000}, // 90 {135, 15000}, { 45, 15000}, {135, 15000}, }; int movesCount = 9; ServoMove* ring1Moves = movesList1;

void setup() {

Serial.begin(19200);

ring1.attach(servo1Pin); ring2.attach(servo2Pin); ring3.attach(servo3Pin); ring4.attach(servo4Pin);

ring1Easer.begin(ring1, servoFrameMillis); ring2Easer.begin(ring2, servoFrameMillis); ring2Easer.setFlipped(true); //ring3Easer.begin(ring3, servoFrameMillis); //ring4Easer.begin(ring4, servoFrameMillis);

//ring1Easer.useMicroseconds(true); ring1Easer.play( ring1Moves, movesCount); //ring2Easer.play( ring1Moves, movesCount);

}

void loop() { ring1Easer.update(); ring2Easer.update();

}

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/todbot/ServoEaser/issues/5#issuecomment-430021489, or mute the thread https://github.com/notifications/unsubscribe-auth/ACnJC8EEOKkB-gH46_xFy5Dcdqkw0KPBks5ulP8VgaJpZM4XdJr1 .

ghost commented 5 years ago

@Totibross sorry, wich code ? Hahah I don't see nothing

KM6TCC commented 5 years ago

ohh .. attached a zip file but it didn't work.. whats your email address

On Mon, Oct 15, 2018 at 3:38 PM KidMustard notifications@github.com wrote:

@Totibross https://github.com/Totibross sorry, wich code ? Hahah I don't see nothing

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/todbot/ServoEaser/issues/5#issuecomment-430038301, or mute the thread https://github.com/notifications/unsubscribe-auth/ACnJC_4Ufznu9yDNrVAxRYyTxdhWt1jrks5ulQ5TgaJpZM4XdJr1 .

ghost commented 5 years ago

@Totibross noyd.null@gmail.com, thanks for your help and your time I appreciate that

todbot commented 3 years ago

I believe this is solved with PR #9