Go·Hardware·Lean - Device drivers
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Drew Bednar 421e8d88e7 adding device table and gc9101 LCD display 2 weeks ago
.github Silence linting 2 years ago
ads1x15 Update to go1.17 4 years ago
adxl345 Fix recursive String() method call 1 month ago
aht20 Add doc file for AHT20 (#72) 2 years ago
aip31068 Devices: Initial Add of Waveshare 1602 Support (#100) 1 year ago
am2320 devices: Add support for AM2320 Temperature/Humidity Sensor (#82) 1 year ago
apa102 Update to go1.17 4 years ago
as7262 Update to go1.17 4 years ago
bh1750 Update to go1.17 4 years ago
bitbang Update to go1.17 4 years ago
bmxx80 bmxx80: add support for filters without using SenseContinuous (#74) 2 years ago
cap1xxx Update to go1.17 4 years ago
ccs811 Update to go1.17 4 years ago
common Introduces driver for Sensirion SHT-4X Temperature/Humidity Sensors. (#109) 12 months ago
dht22 add dht22 support (#111) 5 months ago
ds18b20 Update to go1.17 4 years ago
ds248x Update to go1.17 4 years ago
ep0099 ep0099: optionally read device state on init (#86) 1 year ago
epd Update to go1.17 4 years ago
gc9a01 adding device table and gc9101 LCD display 2 weeks ago
hd44780 hd44780: Restructure to implement conn/display/TextDisplay. Refine to use GPIO.Group (#91) 1 year ago
hdc302x Introduces driver for Sensirion SHT-4X Temperature/Humidity Sensors. (#109) 12 months ago
ht16k33 Update to go1.17 4 years ago
hx711 Update to go1.17 4 years ago
ina219 Issue #73 - restructure so voltage can be returned even if power/current is meaningless. (#87) 1 year ago
inky inky: Add Impression 7.3 Spectra6 support (#110) 11 months ago
lepton lepton/cci: run stringer with "go run" (#96) 1 year ago
lirc lirc requries linebreak \n for SEND_ONCE (#57) 3 years ago
matrixorbital Add Support for MatrixOrbital LK204-7T LCD Display (#93) 1 year ago
max7219 Max7219 LED Driver (#79) 2 years ago
mcp23xxx mcp23xxx: Add GPIO Group support (#92) 1 year ago
mcp472x mcp472x: Initial Add (#108) 12 months ago
mcp9808 Update to go1.17 4 years ago
mfrc522 Update to go1.17 4 years ago
mpu9250 mpu9250: Add i2c interface support (#101) 1 year ago
nrzled Update to go1.17 4 years ago
nxp74hc595 Add Support for 74HC595 Serial -> Parallel Shift Register (#99) 1 year ago
pca9548 Update to go1.17 4 years ago
pca9633 Devices: Initial Add of Waveshare 1602 Support (#100) 1 year ago
pca9685 Update to go1.17 4 years ago
pcf857x devices: Add support for PCF857X GPIO Extenders (#98) 1 year ago
piblaster Update to go1.17 4 years ago
rainbowhat Update to go1.17 4 years ago
scd4x Introduces driver for Sensirion SHT-4X Temperature/Humidity Sensors. (#109) 12 months ago
screen1d Add unnamed private struct 5 years ago
serlcd Add Support for SparkFun SerLCD Display (#88) 1 year ago
sgp30 add sgp30 air quality sensor 4 years ago
sht4x Introduces driver for Sensirion SHT-4X Temperature/Humidity Sensors. (#109) 12 months ago
sn3218 Update to go1.17 4 years ago
ssd1306 ssd1306: Add support for SH1106 and SH1107 (#104) 1 year ago
st7567 Update to go1.17 4 years ago
tca95xx tca95xx: Add support for i/o extenders. (#51) 4 years ago
tic tic: Add I²C support for Tic Stepper Motor Controllers (#78) 2 years ago
tlv493d Update to go1.17 4 years ago
tm1637 Update to go1.17 4 years ago
tmp102 tmp102: Initial add of tmp102 driver. (#76) 2 years ago
unicornhd Silence linting 2 years ago
videosink videosink: Implement rate-limiting, keep-alive 4 years ago
waveshare2in13v2 waveshare2in13v2: Support rotation of image (#46) 4 years ago
waveshare2in13v3 waveshare2in13v3/waveshare2in13v4: adding v3 and v4 waveshare 2.13" ePaper displays (#65) 1 year ago
waveshare2in13v4 waveshare2in13v3/waveshare2in13v4: adding v3 and v4 waveshare 2.13" ePaper displays (#65) 1 year ago
waveshare1602 Devices: Initial Add of Waveshare 1602 Support (#100) 1 year ago
.gohci.yml gohci and github actions: improve testing 5 years ago
AUTHORS Add myself to AUTHORS 2 years ago
CONTRIBUTING.md conntest: Add 100% coverage 9 years ago
CONTRIBUTORS add dht22 support (#111) 5 months ago
LICENSE Initial commit of pio. 10 years ago
README.md adding device table and gc9101 LCD display 2 weeks ago
codecov.yml Reduce PR target coverage to 40% 2 years ago
doc.go Migrate layout to the destination layout 5 years ago
go.mod inky: Fix Impression Driver (#106) 1 year ago
go.sum inky: Fix Impression Driver (#106) 1 year ago

README.md

periph - Peripherals I/O in Go

Documentation is at https://periph.io

Join us for a chat on gophers.slack.com/messages/periph, get an invite here.

mascot

PkgGoDev codecov

Example

Blink a LED:

package main

import (
    "time"
    "periph.io/x/conn/v3/gpio"
    "periph.io/x/host/v3"
    "periph.io/x/host/v3/rpi"
)

func main() {
    host.Init()
    t := time.NewTicker(500 * time.Millisecond)
    for l := gpio.Low; ; l = !l {
        rpi.P1_33.Out(l)
        <-t.C
    }
}

Curious? Look at supported devices for more examples!

Supported Devices

Package Description
ads1x15 ADS1015/ADS1115 analog-to-digital converters via I²C
adxl345 ADXL345 3-axis accelerometer over SPI
aht20 AHT20 temperature/humidity sensor over I²C
aip31068 AIP31068 HD44780-compatible I²C LCD driver
am2320 AOSONG AM2320 temperature/humidity sensor
apa102 APA102 LED strip over SPI
as7262 AMS AS7262 6-channel visible spectral sensor via I²C
bh1750 ROHM BH1750 ambient light sensor over I²C
bitbang Software bit-banging protocols (I²C, SPI, UART) via GPIO pins
bmxx80 Bosch BMP180/BME280/BMP280 temperature/pressure/humidity sensor over I²C or SPI
cap1xxx Microchip CAP1xxx capacitive touch sensors over I²C
ccs811 CCS811 volatile organic compound (VOC) sensor via I²C
common Shared utility functions used across multiple packages
dht22 DHT22/AM2302 temperature/humidity sensor
ds18b20 DS18B20/DS18S20/MAX31820 1-wire temperature sensors
ds248x Maxim DS2483/DS2482-100 1-wire interface chip over I²C
ep0099 EP-0099 Raspberry Pi HAT with 4 relays via I²C
epd Waveshare e-paper display series
gc9a01 GC9A01 240x240 round RGB LCD display over SPI
hd44780 Hitachi HD44780 LCD display chipset
hdc302x Texas Instruments HDC3021/3022 temperature/humidity sensor over I²C
ht16k33 Holtek HT16K33 16×8 LED driver
hx711 HX711 24-bit analog-to-digital converter (load cells)
ina219 Texas Instruments INA219 current/voltage/power monitor over I²C
inky Pimoroni Inky pHAT/wHAT e-ink displays
lepton FLIR Lepton infrared (IR) camera
lirc Infrared receiver support via Linux LIRC
matrixorbital MatrixOrbital character LCD displays
max7219 MAX7219 7-segment and LED matrix displays
mcp23xxx Microchip MCP23xxx GPIO expanders
mcp472x Microchip MCP472x digital-to-analog converters
mcp9808 Microchip MCP9808 temperature sensor
mfrc522 MFRC522 Mifare RFID card reader
mpu9250 MPU-9250 9-axis IMU (gyroscope, accelerometer, magnetometer)
nrzled WS2811/WS2812/WS2812B and compatible NRZ-encoded LEDs (SK6812, UCS1903)
nxp74hc595 74HC595 serial-in parallel-out shift register
pca9548 PCA9548 8-port I²C multiplexer
pca9633 PCA9633 4-channel LED PWM controller
pca9685 PCA9685 16-channel PWM controller (servos, LEDs)
pcf857x TI/NXP PCF857x I²C I/O expander
piblaster PWM via the pi-blaster daemon on Raspberry Pi
rainbowhat Pimoroni Rainbow HAT
scd4x Sensirion SCD4x CO₂ sensors
screen1d 1D display output to terminal via ANSI color codes
serlcd SparkFun SerLCD intelligent LCD display
sgp30 Sensirion SGP30 multi-gas sensor (TVOC and CO₂eq)
sht4x Sensirion SHT-40/SHT-41/SHT-45 temperature/humidity sensors
sn3218 SN3218 18-channel LED driver over I²C
ssd1306 SSD1306/SH1106/SH1107 monochrome OLED displays
st7567 ST7567 single-chip dot matrix LCD
tca95xx Texas Instruments TCA95xx 8-bit I²C GPIO expanders
tic Tic stepper motor controllers via I²C
tlv493d Infineon TLV493D 3D magnetic (Hall effect) sensor
tm1637 TM1637 LED display driver over GPIO
tmp102 Texas Instruments TMP102 temperature sensor over I²C
unicornhd Pimoroni Unicorn HD HAT (16×16 RGB LED matrix)
videosink Display driver serving frames over HTTP
waveshare1602 Waveshare 1602 LCD display
waveshare2in13v2 Waveshare 2.13" v2 e-paper display
waveshare2in13v3 Waveshare 2.13" v3 e-paper display
waveshare2in13v4 Waveshare 2.13" v4 e-paper display

Authors

periph was initiated with ❤️ and passion by Marc-Antoine Ruel. The full list of contributors is in AUTHORS and CONTRIBUTORS.