Skip to content

Commit b4a4e19

Browse files
committed
Example 8 test
1 parent 5f39325 commit b4a4e19

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

examples/Example8_AX12/Example8_AX12.cpp

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,31 @@ void setup(void)
2222
ServoAX12::AddServo(1, "Up", 0, 300);
2323
ServoAX12::AddServo(2, "Down", 0, 300);
2424
ServoAX12::AddServo(11, "Left", 0, 300);
25-
ServoAX12::AddServo(12, "Right", 0, 300);
25+
ServoAX12::AddServo(12, "TOP", 0, 300);
2626
}
2727

2828
int32_t cpt = 0;
2929

3030
void loop(void)
3131
{
32-
ServoAX12::SetServoPosition(1, 10);
33-
while (ServoAX12::IsServoMoving(1))
32+
ServoAX12::SetServoPosition(11, 10);
33+
ServoAX12::SetServoPosition(2, 10);
34+
while (ServoAX12::IsServoMoving(2))
3435
{
35-
ServoAX12::TeleplotPosition(1);
36-
delay(5);
36+
ServoAX12::TeleplotAllPosition();
37+
vTaskDelay(10);
3738
}
38-
delay(1000);
39-
ServoAX12::SetServoPosition(1, 250);
4039
while (ServoAX12::IsServoMoving(1))
4140
{
42-
ServoAX12::TeleplotPosition(1);
43-
delay(5);
41+
ServoAX12::TeleplotAllPosition();
42+
vTaskDelay(10);
4443
}
45-
delay(1000);
46-
}
44+
45+
ServoAX12::SetServoPosition(11, 100);
46+
ServoAX12::SetServoPosition(2, 290);
47+
while (ServoAX12::AreAllServoMoving())
48+
{
49+
ServoAX12::TeleplotAllPosition();
50+
vTaskDelay(10);
51+
}
52+
}

0 commit comments

Comments
 (0)