Node.js and Go1 Robot


I’ve followed the instructions in this video. However, when I run index.js the Go1 does nothing. I’m noticing the MQTT constructor message is not showing in my console, Nor does it state connecting. I made sure that I’m connected to the Go1 via WiFi. Any suggestions? Thanks in advance. The code block is listed below.

import { Go1 } from “@droneblocks/go1-js”

const myRobotDog = new Go1()

myRobotDog.setLedColor(255, 0, 0)

await myRobotDog.wait(3000)

myRobotDog.setLedColor(0, 255, 0)

await myRobotDog.wait(3000)

myRobotDog.setLedColor(0, 0, 255)


await myRobotDog.goForward(0.25,1000)


Thanks for the info. If you are using version 0.1.4 there is a new method to initialize communication. You probably need to do something like this:

import { Go1 } from “@droneblocks/go1-js”
const myRobotDog = new Go1()

We mention that here:

Let me know if that doesn’t get you going!

10-4. I’ll test it this evening and get back to you. Thanks!

1 Like

Thanks Dennis! That worked. :slight_smile: I’ll be utilizing this interface starting tomorrow with students.

So glad to hear that. Thanks for the feedback.