Changed wait to sleep, and added a new wait command

This commit is contained in:
Nathan Kunicki 2018-06-26 11:54:11 +01:00
parent e5cae2986b
commit b5f298cee3

View File

@ -22,7 +22,7 @@ lpf2.on("discover", async (vernie) => { // Wait to discover Vernie
await vernie.sleep(500); await vernie.sleep(500);
// Turn right // Turn right
vernie.wait([ await vernie.wait([
vernie.setMotorAngle("A", 50, 50), vernie.setMotorAngle("A", 50, 50),
vernie.setMotorAngle("B", 50, -50) vernie.setMotorAngle("B", 50, -50)
]); ]);
@ -33,7 +33,7 @@ lpf2.on("discover", async (vernie) => { // Wait to discover Vernie
await vernie.sleep(500); await vernie.sleep(500);
// Turn left // Turn left
vernie.wait([ await vernie.wait([
vernie.setMotorAngle("A", 100, -50), vernie.setMotorAngle("A", 100, -50),
vernie.setMotorAngle("B", 100, 50) vernie.setMotorAngle("B", 100, 50)
]); ]);
@ -44,7 +44,7 @@ lpf2.on("discover", async (vernie) => { // Wait to discover Vernie
await vernie.sleep(500); await vernie.sleep(500);
// Turn right // Turn right
vernie.wait([ await vernie.wait([
vernie.setMotorAngle("A", 50, 50), vernie.setMotorAngle("A", 50, 50),
vernie.setMotorAngle("B", 50, -50) vernie.setMotorAngle("B", 50, -50)
]); ]);