A directory of hardware related libs, tools, and tutorials for Go

Overview

Go + hardware

This repo is a directory of tools, packages and tutorials to let you introduce Go in your hardware projects.

Why Go?

  • Go can target platforms and architectures that are primarily in the scope of non-real time embedded operating systems.

    • ARMv5, ARMv6, ARMv7 and ARMv8 support for Linux
    • ARMv7, ARMv8, x86 support for Android
    • Experimental OpenWRT
  • Out-of-the-box cross compilation story.

    • E.g. Run GOOS=linux GOARCH=arm go build to build a binary for ARM/linux boards from a Mac or Windows machine. No other configuration is required.
  • Built-in concurrency primitives in Go is making it easier to write concurrent programs.

    • Strong advantage in implementing hardware controllers.
    • Strong advantage in implementing networking devices.
  • Go is garbage collected language but the garbage collector footprint has been improved significantly since Go 1.4. The pause times are being targetted to be 10ms or less even with large heaps and is not a significant disadvantage on non-real time operating systems -- the preemptive nature of the OS scheduler is more of a major problem than pause times.

  • Go's network stack is high quality and maintained well. Networking is a core component in IoT.

  • Go provides out-of-the-box HTTP, HTTPS and HTTP/2 client/server implementations.

    • Standard library might be missing higher level implementations for P2P protocols, but the community works to fill that gap.
    • Community is also investing time to implement newer IoT-targeting networking protocols such as COAP.
  • Writing C bindings in Go is very trivial with cgo unlike other high level programming languages like Python and Java. It is so much easier to depend on an existing C/C++ library from the Go context.

    • E.g. portmidi bindings. See the source code to see how you can mix and match Go and C code in the same Go file.
  • C-like syntax enables the existing IoT/embedded programmers (mostly fluent in C) to read and write Go without much knowledge of the language.

  • Go programs compile to static binaries and doesn’t require a runtime on the host (e.g. a VM). Deployment is copy/pasting a binary.

  • Go had strong community figures who worked on the hardware aspects from the early days.

    • Gobot made its debut at the first GopherCon.
    • There are numerous libraries and frameworks around hardware and robotics already contributed by the community. A list can be found at go-hardware.
  • Go is efficient, fast and has low memory footprint.

  • Code reuse between server and client (connected device or mobile).

    • E.g. gRPC Go is working out of the box on servers, Android, iOS and embedded Linux.

Tutorials

Packages

Controllers

  • devices - A repository of high-level device/sensor packages for Go.
  • gobot - High level Go package with a variety of platform APIs to talk to popular drivers such as GPIO on Arduino and Raspberry Pi, Leap Motion or Pebble.
  • go-gpio - GPIO for Go, doesn't require cgo.
  • embd - Embedded programming framework for Go.
  • fadecandy - Dithering OPC-based LED controller
  • godrone - High level Parrot AR Drone 2.0 framework written in Go.
  • launchpad - High level controller library for Novation Launchpad.
  • littlebits - littleBits controller for Go. It requires USB I/O module.
  • piCamera - Capture the stream of Images for a Raspberry Pi Camera in GoLang
  • hwio - Hardware library for ARM boards such as Raspberry Pi and BeagleBone, loosely based on Arduino.
  • go-lepton - Streams images taken on a FLIR Lepton connected to a Raspberry Pi SPI port to over via WebSockets via embedded HTTP server.
  • go-embedded - Embedded Linux support for I2C, SPI, PWM, GPIO, ADC
  • go-beaglebone - Go package for the BeagleBone open source hardware
  • go-mavlink - MAVLink protocol implementation for Go (MAVLink is used to control drones)
  • joystick - a polled API to read the state of an attached joystick.
  • emgo - Go-like language for programming embedded systems (e.g. STM32 MCU).
  • go-rpi-rgb-led-matrix - Controlling up to three chains of 32x32 or 16x32 RGB LED displays using Raspberry Pi GPIO
  • go-rpi-ws281x - Go bindings for Raspberry Pi PWM library for WS281X LEDs Edit
  • ghw - Golang hardware discovery/inspection library
  • sysinfo - A pure Go library providing Linux OS / kernel / hardware system information.

Signal processing, computer vision, graphics, media

  • go-gl - OpenGL bindings for Go.
  • go-opc - Open Pixel Control bindings for Go.
  • go-opencv - OpenCV bindings for Go.
  • go-sox - SoX bindings for Go.
  • portaudio - PortAudio bindings for Go.
  • portmidi - PortMidi bindings for Go.
  • go-osc - Open Sound Control (OSC) bindings for Go.
  • openvg - 2D Graphics library wrapping the OpenVG API
  • lirc - Go Client for Linux Infra-red Remote Control. Allows sending and receiving IR commands.
  • gocv - OpenCV 3+ bindings for Go. Also supports OpenVINO.

Networking, peripheral communications

  • mdns - mDNS server and client implementation in Go. Multicast DNS can be used to discover services and message on the local network without the use of an authoritative DNS server.
  • gatt - Provides a Bluetooth Low Energy GATT implementation.
  • go.hid - Provides communication with USB Human Interface Devices.
  • goble - Bluetooth Low Energy (HM10) module for Go
  • serial - Serial Port Communication Package for Go
  • firmata - Firmata client for Go
  • periph - Peripherals I/O in Go
  • go-ckb - Corsair ckb-daemon communication in Go
  • ble - Bluetooth Low Energy communication wrapper for Linux/macOS.

Mobile (Go 1.5 or above)

Contributions are welcome, please fork and open a PR if you see a missing package, tutorial, etc.

Issues
  • Add go.hid?

    Add go.hid?

    Heya,

    I made go.hid which wraps hidapi, it's used to communicate with USB Human Interface Devices. github.com/GeertJohan/go.hid

    Do you think this is hardware-y enough to be on the list?

    opened by GeertJohan 4
  • Some info from official Go wiki about mobile

    Some info from official Go wiki about mobile

    Added link to Go wiki - native and SDK applications. I guess these little links should be added to /awesome-go for growing this topic up. Less is more :)

    opened by Liferenko 1
  • Add piCamera to the list

    Add piCamera to the list

    I am hoping my Robotics team this year will use this but if not it may be helpful to others. Pretty easy to use. The difficult part is learning all the settings that can be set on the camera.

    opened by dixonwille 1
  • add TinyGo

    add TinyGo

    https://github.com/aykevl/tinygo

    It is a Go compiler for Microcontroller. The following architectures/systems are currently supported:

    • ARM (Cortex-M)
    • AVR (Arduino Uno)
    • Linux
    • WebAssembly
    opened by mrtomyum 0
A program to create assembly 8086 strings to print without using any printing/strings related function but only mov-xchg-int and loops

Assembly String builder tool A program to create assembly 8086 strings to print without using any printing/strings related function but only mov-xchg-

Reg 2 Feb 1, 2022
LogAnalyzer - Analyze logs with custom regex patterns.Can search for particular patterns on multiple files in a directory.

LogAnalyzer Analyze logs with custom regex patterns.Can search for particular patterns on multiple files in a directory

Johnson Simon 6 May 31, 2022
Go tools sourcecode read and customize

Go Tools This subrepository holds the source for various packages and tools that support the Go programming language. Some of the tools, godoc and vet

fumeboy 0 Oct 24, 2021
Code generation tools for Go.

interfaces Code generation tools for Go's interfaces. Tools available in this repository: cmd/interfacer cmd/structer cmd/interfacer Generates an inte

Rafal Jeczalik 344 Jun 17, 2022
gqlanalysis makes easy to develop static analysis tools for GraphQL in Go.

gqlanalysis gqlanalysis defines the interface between a modular static analysis for GraphQL in Go. gqlanalysis is inspired by go/analysis. gqlanalysis

null 34 Apr 11, 2022
gopkg is a universal utility collection for Go, it complements offerings such as Boost, Better std, Cloud tools.

gopkg is a universal utility collection for Go, it complements offerings such as Boost, Better std, Cloud tools. Table of Contents Introduction

Bytedance Inc. 695 Jul 1, 2022
Little Bug Bounty & Hacking Tools⚔️

Little Bug Bounty & Hacking Tools ⚔️

gilfoyle97 139 Jun 30, 2022
common tools for golang

utils common tools for golang package main

daqNext 0 Dec 27, 2021
Source code of Liteloader Tools

LiteLoader Tools This repository store the source code of some LiteLoader Tools Prebuilt Binary see /bin folder Image2Binary [Golang] convert Image(jp

LiteLoaderBDS Developers 3 Apr 26, 2022
A fully Go userland with Linux bootloaders! u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go.

u-root Description u-root embodies four different projects. Go versions of many standard Linux tools, such as ls, cp, or shutdown. See cmds/core for m

null 2k Jun 27, 2022
Mackerel SLI/SLO tools

shimesaba For SRE to operate and monitor services using Mackerel. Description shimesaba is a tool for tracking SLO/ErrorBudget using Mackerel as an SL

ikeda-masashi 8 May 16, 2022
Like tools/cmd/stringer with bitmask features

Bitmasker Bitmasker is a tool used to automate the creation of helper methods when dealing with bitmask-type constant flags. Given the name of an unsi

Go Curses 0 Nov 25, 2021
Functional tools in Go 1.18 using newly introduced generics

functools functools is a simple Go library that brings you your favourite functi

Rakeeb Hossain 176 Jun 9, 2022
Generic-based collection tools

go-collection go collection is a tool implemented using generic, it can help you process slice/map data quickly and easily convert between them. Note:

王杨 10 Jun 21, 2022
A full-featured license tool to check and fix license headers and resolve dependencies' licenses.

SkyWalking Eyes A full-featured license tool to check and fix license headers and resolve dependencies' licenses. Usage You can use License-Eye in Git

The Apache Software Foundation 136 Jun 28, 2022
A Go (golang) library for parsing and verifying versions and version constraints.

go-version is a library for parsing versions and version constraints, and verifying versions against a set of constraints. go-version can sort a collection of versions properly, handles prerelease/beta versions, can increment versions, etc.

HashiCorp 1.2k Jun 25, 2022
🤖🤝A tool to test and analyze storage and retrieval deal capability on the Filecoin network.

Dealbot A tool to test and analyze storage and retrieval deal capability on the Filecoin network. Getting Started Clone the repo and build: git clone

Filecoin 29 Jun 6, 2022
Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Parca 2.3k Jul 4, 2022
CUE utilities and helpers for working with tree based objects in any combination of CUE, Yaml, and JSON.

Cuetils CUE utilities and helpers for working with tree based objects in any combination of CUE, Yaml, and JSON. Using As a command line binary The cu

_Hofstadter 55 Jun 15, 2022