netlabtoolkit / VarSpeedServo

Arduino library for servos that extends the standard servo.h library with the ability to set speed, and wait for position to complete
GNU Lesser General Public License v2.1
292 stars 127 forks source link

sequencePlay function only playing 1st position point #36

Open Dirk275 opened 4 years ago

Dirk275 commented 4 years ago

First time I have tested the sequencePlay function:

With an own program but also with the original example "ServoSequence" the sequencePlay function only plays the first position point, then does nothing else. Is there a way around it?

Dirk275 commented 4 years ago

Still any activity here???

Dirk275 commented 4 years ago

The ServoSequence example doesn't work for me. If I change the main loop like this:

void loop() { if (sensorValue > 200) { for(int i = 0; i < 4; i++) { myservo1.sequencePlay(slow, 3); while(myservo1.isMoving()) delay(50); } } else { // ... } delay(2); }

... the sequence is played correctly. But: why do I have to use a loop for the sequencePlay function, that should play the loop by itself? And why do I have to wait for the end of each sequence point?