Changed wait to sleep, and added a new wait command
This commit is contained in:
parent
e5cae2986b
commit
b5f298cee3
@ -22,7 +22,7 @@ lpf2.on("discover", async (vernie) => { // Wait to discover Vernie
|
||||
await vernie.sleep(500);
|
||||
|
||||
// Turn right
|
||||
vernie.wait([
|
||||
await vernie.wait([
|
||||
vernie.setMotorAngle("A", 50, 50),
|
||||
vernie.setMotorAngle("B", 50, -50)
|
||||
]);
|
||||
@ -33,7 +33,7 @@ lpf2.on("discover", async (vernie) => { // Wait to discover Vernie
|
||||
await vernie.sleep(500);
|
||||
|
||||
// Turn left
|
||||
vernie.wait([
|
||||
await vernie.wait([
|
||||
vernie.setMotorAngle("A", 100, -50),
|
||||
vernie.setMotorAngle("B", 100, 50)
|
||||
]);
|
||||
@ -44,7 +44,7 @@ lpf2.on("discover", async (vernie) => { // Wait to discover Vernie
|
||||
await vernie.sleep(500);
|
||||
|
||||
// Turn right
|
||||
vernie.wait([
|
||||
await vernie.wait([
|
||||
vernie.setMotorAngle("A", 50, 50),
|
||||
vernie.setMotorAngle("B", 50, -50)
|
||||
]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user