Autonomous Vernie roaming example

This commit is contained in:
Nathan Kellenicki 2018-10-12 16:38:57 -07:00
parent 4bc0e0e006
commit caf2263ea0

View File

@ -72,7 +72,6 @@ poweredUP.on("discover", async (vernie) => { // Wait to discover Vernie
await vernie.sleep(1000); await vernie.sleep(1000);
const { leftDistance, forwardDistance, rightDistance } = await scan(vernie); const { leftDistance, forwardDistance, rightDistance } = await scan(vernie);
console.log(leftDistance, forwardDistance, rightDistance);
if (rightDistance >= forwardDistance && rightDistance >= leftDistance) { if (rightDistance >= forwardDistance && rightDistance >= leftDistance) {
// Go right // Go right