Meet The Code

Gobot makes commanding robots incredibly simple and fun.

All you need to get started is install Gobot with :

go get -d -u github.com/hybridgroup/gobot/...

The "Hello, World" Of Things

This program connects to an Arduino, and toggles an LED every one second.

package main

import (
  "time"
  "github.com/hybridgroup/gobot"
  "github.com/hybridgroup/gobot/platforms/firmata"
  "github.com/hybridgroup/gobot/platforms/gpio"
)

func main() {
  gbot := gobot.NewGobot()

  firmataAdaptor := firmata.NewFirmataAdaptor("arduino", "/dev/ttyACM0")
  led := gpio.NewLedDriver(firmataAdaptor, "led", "13")

  work := func() {
    gobot.Every(1*time.Second, func() {
      led.Toggle()
    })
  }

  gbot.AddRobot(gobot.NewRobot("bot",
    []gobot.Connection{firmataAdaptor},
    []gobot.Device{led},
    work,
  ))

  gbot.Start()
}

We've got lots more examples to help you get started on your next IoT project!

Platform Support

Gobot has a extensible system for connecting to hardware devices. The following robotics and physical computing platforms are currently supported:

15 Platforms

Support for many devices that use General Purpose Input/Output (GPIO) have a shared set of drivers provded using the gobot-gpio module:

7 GPIO drivers

Support for devices that use Inter-Integrated Circuit (I2C) have a shared set of drivers provded using the gobot-i2c module:

5 I2C drivers

API

Gobot includes a cppp.io compliant RESTful API to query the status of any connection, device or robot running in your swarm. It additionally has the ability to issue commands directly to your devices and robots.

It also comes with the robeaux AngularJS interface baked right into it's API server for quick and easy configuration.

You can check out more information on the Gobot API in the docs here

CLI

Gobot is designed to be using in conjunction with Gort, a Command Line Toolkit (CLI) for RobotOps. Gort provides tools to scan for connected devices, upload firmware, and it works perfectly with Gobot. Also included with Gobot is a CLI for generating new robots and adaptors.

Gobot also has it own CLI which you can learn more about here.

Be Part Of The Robot Evolution