mirror of https://github.com/periph/devices
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.
|
|
2 weeks ago | |
|---|---|---|
| .github | 2 years ago | |
| ads1x15 | 4 years ago | |
| adxl345 | 1 month ago | |
| aht20 | 2 years ago | |
| aip31068 | 1 year ago | |
| am2320 | 1 year ago | |
| apa102 | 4 years ago | |
| as7262 | 4 years ago | |
| bh1750 | 4 years ago | |
| bitbang | 4 years ago | |
| bmxx80 | 2 years ago | |
| cap1xxx | 4 years ago | |
| ccs811 | 4 years ago | |
| common | 12 months ago | |
| dht22 | 5 months ago | |
| ds18b20 | 4 years ago | |
| ds248x | 4 years ago | |
| ep0099 | 1 year ago | |
| epd | 4 years ago | |
| gc9a01 | 2 weeks ago | |
| hd44780 | 1 year ago | |
| hdc302x | 12 months ago | |
| ht16k33 | 4 years ago | |
| hx711 | 4 years ago | |
| ina219 | 1 year ago | |
| inky | 11 months ago | |
| lepton | 1 year ago | |
| lirc | 3 years ago | |
| matrixorbital | 1 year ago | |
| max7219 | 2 years ago | |
| mcp23xxx | 1 year ago | |
| mcp472x | 12 months ago | |
| mcp9808 | 4 years ago | |
| mfrc522 | 4 years ago | |
| mpu9250 | 1 year ago | |
| nrzled | 4 years ago | |
| nxp74hc595 | 1 year ago | |
| pca9548 | 4 years ago | |
| pca9633 | 1 year ago | |
| pca9685 | 4 years ago | |
| pcf857x | 1 year ago | |
| piblaster | 4 years ago | |
| rainbowhat | 4 years ago | |
| scd4x | 12 months ago | |
| screen1d | 5 years ago | |
| serlcd | 1 year ago | |
| sgp30 | 4 years ago | |
| sht4x | 12 months ago | |
| sn3218 | 4 years ago | |
| ssd1306 | 1 year ago | |
| st7567 | 4 years ago | |
| tca95xx | 4 years ago | |
| tic | 2 years ago | |
| tlv493d | 4 years ago | |
| tm1637 | 4 years ago | |
| tmp102 | 2 years ago | |
| unicornhd | 2 years ago | |
| videosink | 4 years ago | |
| waveshare2in13v2 | 4 years ago | |
| waveshare2in13v3 | 1 year ago | |
| waveshare2in13v4 | 1 year ago | |
| waveshare1602 | 1 year ago | |
| .gohci.yml | 5 years ago | |
| AUTHORS | 2 years ago | |
| CONTRIBUTING.md | 9 years ago | |
| CONTRIBUTORS | 5 months ago | |
| LICENSE | 10 years ago | |
| README.md | 2 weeks ago | |
| codecov.yml | 2 years ago | |
| doc.go | 5 years ago | |
| go.mod | 1 year ago | |
| go.sum | 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.
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.
