Need help with gobot?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

7.4K Stars 915 Forks Other 2.7K Commits 163 Opened issues


Golang framework for robotics, drones, and the Internet of Things (IoT)

Services available


Need anything else?

Contributors list


GoDoc CircleCI Build status Appveyor Build status codecov Go Report Card License

Gobot ( is a framework using the Go programming language ( for robotics, physical computing, and the Internet of Things.

It provides a simple, yet powerful way to create solutions that incorporate multiple, different hardware devices at the same time.

Want to run Go directly on microcontrollers? Check out our sister project TinyGo (

Getting Started

Get the Gobot package by running this command:

go get -d -u


Gobot with Arduino

package main

import ( "time"



func main() { firmataAdaptor := firmata.NewAdaptor("/dev/ttyACM0") led := gpio.NewLedDriver(firmataAdaptor, "13")

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

robot := gobot.NewRobot("bot",



Gobot with Sphero

package main

import ( "fmt" "time"



func main() { adaptor := sphero.NewAdaptor("/dev/rfcomm0") driver := sphero.NewSpheroDriver(adaptor)

work := func() {
    gobot.Every(3*time.Second, func() {
        driver.Roll(30, uint16(gobot.Rand(360)))

robot := gobot.NewRobot("sphero",



"Metal" Gobot

You can use the entire Gobot framework as shown in the examples above ("Classic" Gobot), or you can pick and choose from the various Gobot packages to control hardware with nothing but pure idiomatic Golang code ("Metal" Gobot). For example:

package main

import ( "" "" "time" )

func main() { e := edison.NewAdaptor() e.Connect()

led := gpio.NewLedDriver(e, "13")

for {
    time.Sleep(1000 * time.Millisecond)


"Master" Gobot

You can also use the full capabilities of the framework aka "Master Gobot" to control swarms of robots or other features such as the built-in API server. For example:

package main

import ( "fmt" "time"



func NewSwarmBot(port string) *gobot.Robot { spheroAdaptor := sphero.NewAdaptor(port) spheroDriver := sphero.NewSpheroDriver(spheroAdaptor) spheroDriver.SetName("Sphero" + port)

work := func() {

    spheroDriver.On(sphero.Collision, func(data interface{}) {
        fmt.Println("Collision Detected!")

    gobot.Every(1*time.Second, func() {
        spheroDriver.Roll(100, uint16(gobot.Rand(360)))
    gobot.Every(3*time.Second, func() {

robot := gobot.NewRobot("sphero",

return robot


func main() { master := gobot.NewMaster() api.NewAPI(master).Start()

spheros := []string{

for _, port := range spheros {



Hardware Support

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

Support for many devices that use General Purpose Input/Output (GPIO) have a shared set of drivers provided using the

  • GPIO <=> Drivers
    • AIP1640 LED
    • Button
    • Buzzer
    • Direct Pin
    • EasyDriver
    • Grove Button
    • Grove Buzzer
    • Grove LED
    • Grove Magnetic Switch
    • Grove Relay
    • Grove Touch Sensor
    • LED
    • Makey Button
    • Motor
    • Proximity Infra Red (PIR) Motion Sensor
    • Relay
    • RGB LED
    • Servo
    • Stepper Motor
    • TM1638 LED Controller

Support for many devices that use Analog Input/Output (AIO) have a shared set of drivers provided using the

  • AIO <=> Drivers
    • Analog Sensor
    • Grove Light Sensor
    • Grove Piezo Vibration Sensor
    • Grove Rotary Dial
    • Grove Sound Sensor
    • Grove Temperature Sensor

Support for devices that use Inter-Integrated Circuit (I2C) have a shared set of drivers provided using the

  • I2C <=> Drivers
    • Adafruit Motor Hat
    • ADS1015 Analog to Digital Converter
    • ADS1115 Analog to Digital Converter
    • ADXL345 Digital Accelerometer
    • BH1750 Digital Luminosity/Lux/Light Sensor
    • BlinkM LED
    • BME280 Barometric Pressure/Temperature/Altitude/Humidity Sensor
    • BMP180 Barometric Pressure/Temperature/Altitude Sensor
    • BMP280 Barometric Pressure/Temperature/Altitude Sensor
    • BMP388 Barometric Pressure/Temperature/Altitude Sensor
    • DRV2605L Haptic Controller
    • Grove Digital Accelerometer
    • GrovePi Expansion Board
    • Grove RGB LCD
    • HMC6352 Compass
    • INA3221 Voltage Monitor
    • JHD1313M1 LCD Display w/RGB Backlight
    • L3GD20H 3-Axis Gyroscope
    • LIDAR-Lite
    • MCP23017 Port Expander
    • MMA7660 3-Axis Accelerometer
    • MPL115A2 Barometer
    • MPU6050 Accelerometer/Gyroscope
    • PCA9685 16-channel 12-bit PWM/Servo Driver
    • SHT2x Temperature/Humidity
    • SHT3x-D Temperature/Humidity
    • SSD1306 OLED Display Controller
    • TSL2561 Digital Luminosity/Lux/Light Sensor
    • Wii Nunchuck Controller

Support for devices that use Serial Peripheral Interface (SPI) have a shared set of drivers provided using the

  • SPI <=> Drivers
    • APA102 Programmable LEDs
    • MCP3002 Analog/Digital Converter
    • MCP3004 Analog/Digital Converter
    • MCP3008 Analog/Digital Converter
    • MCP3202 Analog/Digital Converter
    • MCP3204 Analog/Digital Converter
    • MCP3208 Analog/Digital Converter
    • MCP3304 Analog/Digital Converter
    • SSD1306 OLED Display Controller

More platforms and drivers are coming soon...


Gobot includes a RESTful API to query the status of any robot running within a group, including the connection and device status, and execute device commands.

To activate the API, import the
package and instantiate the
like this:
  master := gobot.NewMaster()

You can also specify the api host and port, and turn on authentication:

  master := gobot.NewMaster()
  server := api.NewAPI(master)
  server.Port = "4000"
  server.AddHandler(api.BasicAuth("gort", "klatuu"))

You may access the robeaux React.js interface with Gobot by navigating to



Gobot uses the Gort Command Line Interface (CLI) so you can access important features right from the command line. We call it "RobotOps", aka "DevOps For Robotics". You can scan, connect, update device firmware, and more!

Gobot also has its own CLI to generate new platforms, adaptors, and drivers. You can check it out in the



We're always adding documentation to our web site at please check there as we continue to work on Gobot

Thank you!

Need help?


For our contribution guidelines, please go to .

Gobot is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. You can read about it here.


Copyright (c) 2013-2020 The Hybrid Group. Licensed under the Apache 2.0 license.

The Contributor Covenant is released under the Creative Commons Attribution 4.0 International Public License, which requires that attribution be included.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.