gitmyhub

gobot

Go ★ 9.4k updated 5mo ago

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

Gobot is a Go framework for controlling physical hardware, robots, drones, IoT sensors, and motors, supporting dozens of platforms like Arduino, Raspberry Pi, and DJI Tello out of the box without writing low-level hardware code.

Gosetup: moderatecomplexity 3/5

Gobot is a Go programming framework for working with physical hardware: robots, drones, sensors, motors, and devices that connect to the Internet of Things. If you want to write Go code that controls an LED on an Arduino, steers a DJI Tello drone, talks to a Bluetooth device, or reads from sensors on a Raspberry Pi, Gobot provides the packages and abstractions to do that without writing low-level hardware communication code from scratch.

The framework supports a wide range of hardware platforms out of the box, including Arduino, BeagleBone, Intel Edison, Microbit, various Sphero robots, MQTT message brokers, NATS messaging, OpenCV for computer vision, and more. Each platform is a separate package, so you only pull in what your project needs.

Gobot offers three ways to use it. The "Classic" approach uses the framework's built-in robot and work loop concepts, which handle timing, device lifecycle, and event handling for you. The "Metal" approach lets you skip the framework entirely and call platform packages directly with plain Go code if you want more control. The "Master" approach adds a layer on top, letting you manage a collection of robots at once and exposing a built-in HTTP API so you can monitor and control them from outside the program.

A sister project called TinyGo is mentioned for developers who want to run Go code directly on microcontrollers rather than on a full computer like a Raspberry Pi.

Gobot is open-source and licensed under the Apache 2.0 license. The project is maintained by the Hybridgroup team and has been around long enough to accumulate broad hardware support across dozens of platforms.

Where it fits