Autonomous Vernie roaming example
This commit is contained in:
parent
4bc0e0e006
commit
caf2263ea0
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user