• Stars
    star
    1,329
  • Rank 35,345 (Top 0.7 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.

More Repositories

1

hey

HTTP load generator, ApacheBench (ab) replacement
Go
17,864
star
2

boom

HTTP(S) load generator, ApacheBench (ab) replacement, written in Go
Go
4,745
star
3

statik

Embed files into a Go executable
Go
3,649
star
4

gom

A visual interface to work with runtime profiling data for Go
Go
1,295
star
5

gotest

go test with colors
Go
1,242
star
6

coop

Cheat sheet for some of the common concurrent flows in Go
Go
1,214
star
7

autopprof

Pprof made easy at development time for Go
Go
738
star
8

drive

Pull or push Google Drive files
Go
465
star
9

openai-go

Go client libraries for OpenAI
Go
443
star
10

go-test-trace

Go test with tracing.
Go
381
star
11

govalidate

Validates your Go installation and dependencies.
Go
335
star
12

portmidi

Go bindings for libportmidi
Go
283
star
13

globalconf

Persist flag values into an ini file
Go
275
star
14

magicmime

Go bindings for libmagic to detect MIME types
Go
216
star
15

ticktock

A cron job scheduler for Go
Go
209
star
16

go2xcode

Go package to Xcode project generator
Go
177
star
17

fake-it-til-you-make-it

A program that demonstrates that GitHub contribution graph can be cheated
Go
147
star
18

golambda

AWS Lambda Go functions made easy...
Go
137
star
19

launchpad

Talk to your Novation Launchpad in Go
Go
130
star
20

pprof-merge

Merge multiple pprof profile files into a single file
Go
118
star
21

events2prom

A metric collection daemon allows you to configure aggregations in runtime
Go
107
star
22

goproxy-s3

Go proxy that serves from S3
Go
104
star
23

go-sql-driver-spanner

Google Cloud Spanner driver for Go
Go
89
star
24

awesome-spanner

A curated list of awesome Google Cloud Spanner references, tools, libraries and more.
82
star
25

coinsensus

Decentralized distributed systems consensus
62
star
26

opencensus-grpc-demo

Export metrics and traces from gRPC servers and clients
Java
59
star
27

spannerz

Google Cloud Spanner Query Planner Visualizer
Go
59
star
28

aws-containers

My personal mind map of container platforms and tools on AWS
53
star
29

gowiki

Personal fork of Go wiki
47
star
30

command

CLI subcommands for Go
Go
44
star
31

trace

Drafts of a Dapper-style tracing client for Go
Go
44
star
32

obs-luts

LUT files to use with OBS
43
star
33

littlebits

littleBits Go module -- an io.Reader and io.Writer to read from and write to a circuit
Go
40
star
34

dfanout

A simple HTTP/2 fanout server
Go
38
star
35

goutil

Various Go utility packages.
Go
37
star
36

gce-metadata

GCE metadata command line tool
Go
32
star
37

myko

A simple attribution engine.
Go
28
star
38

log-to-xray

Write log entries, get X-Ray traces.
Go
27
star
39

pprof-upload

Upload pprof output to continuous profiler
Go
26
star
40

keys

Let your golang programs store and access passwords in a secure way
Go
26
star
41

go-numa

NUMA bindings for Go, requires libnuma.
Go
24
star
42

httpaa

Where http.HaandleFunc and alike lives.
Go
23
star
43

drummachine

Akai MPD18 replica written in Go, runs on mobile devices
Go
21
star
44

go-xcode

Reference Xcode project to build iOS apps with Go
Makefile
18
star
45

firmata

Firmata client for Go
Arduino
18
star
46

k8s-helloworld-leaderelection

Go
16
star
47

audio

Go
15
star
48

bubblr

Android client for App Engine Channels API
Java
15
star
49

rrqueue

Simple priority queues and round robin consumer for golang
Go
15
star
50

cosmicbackgroundmusic

Go
13
star
51

mysql-args-anonymizer

Go
13
star
52

sensors

Experiments with Android NDK sensors and Go
Go
13
star
53

redfail

Simple command to colorize the stderr of a target program
Go
12
star
54

opentelemetry-metric-go

Experiments, no real code.
Go
12
star
55

node-plussignin

Google+ Sign In middleware for Connect.
JavaScript
12
star
56

gcp-connectivitytests

Google Cloud Connectivity Tests
Go
11
star
57

perf2cloudprofiler

Upload perf output to Google Cloud profiler from anywhere
Go
10
star
58

drivefuse

Google Drive for Linux, BSD and MacOSX
C
10
star
59

grpcutil

Go
9
star
60

spanner-dotfiles

A set of personal aliases to use with Google Cloud Spanner.
7
star
61

talks

7
star
62

go-brillo

Go development notes for the Brillo targets. (External contributors who are willing to contribute are welcomed to comment.)
7
star
63

go-benchmarks

6
star
64

al

OpenAL bindings for Go (work-in-progress)
6
star
65

janis

The missing components of Android SDK
Java
6
star
66

pizza

rakyll.pizza
Go
6
star
67

rakyll.github.io

HTML
5
star
68

blinker

A tiny Raspberry Pi program controlled by a Go mobile app
Go
5
star
69

pubsub

Go
5
star
70

rakyll

Public profile...
5
star
71

refutil

Personal collection of reflection utils for Go
Go
4
star
72

benchmarks

Interesting Go benchmarks to watch
Go
4
star
73

experimental

Experimental Go packages
Go
3
star
74

node-ini

Simple ini reader for Node.js
JavaScript
3
star
75

snippetr

Extract code snippets from source code.
JavaScript
3
star
76

go0

$ docker run -i -t rakyll/go0
Dockerfile
2
star
77

ecs-metadata-proxy

Proxy to debug metadata server in ECS tasks
Go
2
star
78

aestaticdeploy

Takes a static directory and serves it on Google App Engine
Go
2
star
79

zigot

En extensible protocol for cloud storage, against of proprietary APIs.
2
star
80

appdatapreferences-localstorage

Syncs your local storage to Google Drive's appdata folder.
JavaScript
2
star
81

skeleton

skeletons for go projects
Go
1
star
82

travis-build

Go
1
star
83

colab-gemini

Jupyter Notebook
1
star
84

trace2

Go
1
star
85

allgo

All Go is a repo to be used to test godoc command and godoc.org
Go
1
star
86

dockerfiles

All images are ARMv7
1
star
87

reviews

Catch all repo for reviewing things.
1
star