
periph.io/x/periph is a standalone hardware library with no external dependency. It can be viewed as a lower level layer than Gobot and, yes, we’re discussing to collaborate in the future!
cgo.
Linux
Generic linux support for any board

Windows
hack on your laptop

macOS
hack on your laptop

BeagleBone
Series of high quality boards

C.H.I.P.
NextThing Co's board

ODROID-C1
HardKernel board

Raspberry Pi
running Raspbian Lite

APA102
13 bits LEDs

BMxx80
Family of atmospheric sensors

Button
React to button presses without polling

Buzzer
Annoy your friends with noise

CAP1xxx
Family of capacitive touch sensors

DS18b20
Inexpensive temperature sensor

DS248x
1-wire interface over I²C

FLIR Lepton
InfraRed Thermal Camera

FTDI FT232x
Fast USB multi-protocol connectivity

GPIO
Generic digital input/output support

IR remote
InfraRed remote support

LED
Toggle a LED is the first step

Motion detector
Detect motion without polling

SSD1306
1 bit OLED display controller

TM1637
Segment controller
periph includes many ready-to-use tools:
go get periph.io/x/periph/cmd/...
# List the host drivers registered and/or initialized:
periph-info
# List the board headers:
headers-list
# List the state of each GPIO:
gpio-list
# Set P1_7/GPIO4 on a Raspberry Pi to high:
gpio-write P1_7 1periph tries hard to get out of the way when used as a
library.
Here’s the minimal “toggle a LED” example:
package main
import (
"time"
"periph.io/x/periph/conn/gpio"
"periph.io/x/periph/conn/gpio/gpioreg"
"periph.io/x/periph/host"
)
func main() {
host.Init()
p := gpioreg.ByName("11")
t := time.NewTicker(500 * time.Millisecond)
for l := gpio.Low; ; l = !l {
p.Out(l)
<-t.C
}
}Learn more about GPIOs.

periph was initiated with ❤️️ and passion by Marc-Antoine
Ruel. The full list of contributors is in
AUTHORS and
CONTRIBUTORS.
This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.
This project is not affiliated with the Go project.