# Node.js and Go1 Robot

**URL:** <https://community.droneblocks.io/t/node-js-and-go1-robot/1005>\
**Category:** Robots\
**Created:** [July 12, 2023, 12:38pm UTC](https://community.droneblocks.io/t/node-js-and-go1-robot/1005 "2023-07-12T12:38:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffepps](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@jeffepps](https://community.droneblocks.io/u/jeffepps)\
**Post date:** [July 12, 2023, 12:38pm UTC](https://community.droneblocks.io/t/node-js-and-go1-robot/1005/1 "2023-07-12T12:38:13Z")

</div>

Hello,

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)

console.log(“Starting!”)

await myRobotDog.goForward(0.25,1000)

console.log(“done!”)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/droneblocks/original/1X/f69c95a89cfbb91e654d86e4c233cd5dfded5ee8.jpeg)

---

<div class="post-metadata">

**Author:** ![dbaldwin](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@dbaldwin](https://community.droneblocks.io/u/dbaldwin)\
**Post date:** [July 12, 2023, 5:27pm UTC](https://community.droneblocks.io/t/node-js-and-go1-robot/1005/2 "2023-07-12T17:27:27Z")

</div>

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:

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

```

We mention that here:

> **[@droneblocks/go1-js](https://www.npmjs.com/package/@droneblocks/go1-js)**
>
> \`\`\`
> let dog = new Go1();
> dog.init(); // version 0.1.4+ requirement
> dog.setMode(Go1Mode.walk);
> dog.goForward(0.25, 2000);
> \`\`\`. Latest version: 0.1.5, last published: 2 months ago. Start using @droneblocks/go1-js in your project by running \`npm i...

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

---

<div class="post-metadata">

**Author:** ![jeffepps](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@jeffepps](https://community.droneblocks.io/u/jeffepps)\
**Post date:** [July 12, 2023, 5:50pm UTC](https://community.droneblocks.io/t/node-js-and-go1-robot/1005/3 "2023-07-12T17:50:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jeffepps](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@jeffepps](https://community.droneblocks.io/u/jeffepps)\
**Post date:** [July 12, 2023, 10:34pm UTC](https://community.droneblocks.io/t/node-js-and-go1-robot/1005/4 "2023-07-12T22:34:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dbaldwin](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@dbaldwin](https://community.droneblocks.io/u/dbaldwin)\
**Post date:** [July 13, 2023, 4:47pm UTC](https://community.droneblocks.io/t/node-js-and-go1-robot/1005/5 "2023-07-13T16:47:55Z")

</div>

So glad to hear that. Thanks for the feedback.
