devices

package module
v0.0.0-...-c768f7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

README

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 Coverage Status

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!

Authors

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

Disclaimer

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.

Documentation

Overview

Package devices is a container for device drivers.

Subpackages contain the concrete implementations. Devices accept port interface, constructors return concrete type.

Directories

Path Synopsis
Package ads1x15 controls ADS1015/ADS1115 Analog-Digital Converters (ADC) via I²C interface.
Package ads1x15 controls ADS1015/ADS1115 Analog-Digital Converters (ADC) via I²C interface.
Package apa102 drives a strip of APA102 LEDs connected on a SPI port.
Package apa102 drives a strip of APA102 LEDs connected on a SPI port.
Package as7262 controls an AMS 6 channel visible spectral sensor via an i2c interface.
Package as7262 controls an AMS 6 channel visible spectral sensor via an i2c interface.
Package bh1750 controls a ROHM BH1750 ambient light sensor, over an i2c bus.
Package bh1750 controls a ROHM BH1750 ambient light sensor, over an i2c bus.
Package bitbang implements conn by banging on the bits (GPIO pins).
Package bitbang implements conn by banging on the bits (GPIO pins).
Package bmxx80 controls a Bosch BMP180/BME280/BMP280 device over I²C, or SPI for the BMx280.
Package bmxx80 controls a Bosch BMP180/BME280/BMP280 device over I²C, or SPI for the BMx280.
bmx280smoketest
Package bmx280smoketest is leveraged by periph-smoketest to verify that two BME280/BMP280, one over I²C, one over SPI, read roughly the same temperature, humidity and pressure.
Package bmx280smoketest is leveraged by periph-smoketest to verify that two BME280/BMP280, one over I²C, one over SPI, read roughly the same temperature, humidity and pressure.
Package cap1xxx controls a Microchip cap1105/cap1106/cap1114/cap1133/cap1126/cap1128/cap1166/cap1188 device over I²C. The cap1xxx devices are a 3/5/6/8/14 channel capacitive touch sensor with 2/3/6/8/11 LED drivers.
Package cap1xxx controls a Microchip cap1105/cap1106/cap1114/cap1133/cap1126/cap1128/cap1166/cap1188 device over I²C. The cap1xxx devices are a 3/5/6/8/14 channel capacitive touch sensor with 2/3/6/8/11 LED drivers.
Package ccs811 controls CCS811 Volatile Organic Compounds sensor via I²C interface.
Package ccs811 controls CCS811 Volatile Organic Compounds sensor via I²C interface.
Package ds18b20 interfaces to Dallas Semi / Maxim DS18B20 and MAX31820 1-wire temperature sensors.
Package ds18b20 interfaces to Dallas Semi / Maxim DS18B20 and MAX31820 1-wire temperature sensors.
Package ds248x controls a Maxim DS2483 or DS2482-100 1-wire interface chip over I²C. More details See https://periph.io/device/ds248x/ for more details about the device.
Package ds248x controls a Maxim DS2483 or DS2482-100 1-wire interface chip over I²C. More details See https://periph.io/device/ds248x/ for more details about the device.
Package ep0099 controls a EP-0099 Raspberry Pi HAT with 4 relays via I2C. Datasheet https://wiki.52pi.com/index.php/DockerPi_4_Channel_Relay_SKU:_EP-0099
Package ep0099 controls a EP-0099 Raspberry Pi HAT with 4 relays via I2C. Datasheet https://wiki.52pi.com/index.php/DockerPi_4_Channel_Relay_SKU:_EP-0099
epd
Package epd controls Waveshare e-paper series displays.
Package epd controls Waveshare e-paper series displays.
image2bit
Package image2bit implements two bit gray scale (white, light gray, dark gray, black) 2D graphics.
Package image2bit implements two bit gray scale (white, light gray, dark gray, black) 2D graphics.
Package hd44780 controls the Hitachi LCD display chipset HD-44780 Datasheet https://www.sparkfun.com/datasheets/LCD/HD44780.pdf
Package hd44780 controls the Hitachi LCD display chipset HD-44780 Datasheet https://www.sparkfun.com/datasheets/LCD/HD44780.pdf
Package ht16k33 implements interfacing code to Holtek HT16K33 Alphanumeric 16x8 LED driver.
Package ht16k33 implements interfacing code to Holtek HT16K33 Alphanumeric 16x8 LED driver.
Package hx711 implements an interface to the 24-bits HX711 analog to digital converter.
Package hx711 implements an interface to the 24-bits HX711 analog to digital converter.
Package ina219 controls a Texas Instruments ina219 high side current, voltage and power monitor IC over an i2c bus.
Package ina219 controls a Texas Instruments ina219 high side current, voltage and power monitor IC over an i2c bus.
ina219smoketest
Package ina219smoketest tests the ina219 device.
Package ina219smoketest tests the ina219 device.
Package inky drives an Inky pHAT, pHAT v2 or wHAT E ink display.
Package inky drives an Inky pHAT, pHAT v2 or wHAT E ink display.
Package lepton drives a FLIR Lepton Infra Red (IR) camera.
Package lepton drives a FLIR Lepton Infra Red (IR) camera.
cci
Package cci declares the Camera Command Interface to interact with a FLIR Lepton over I²C. This protocol controls and queries the camera but is not used to read the images.
Package cci declares the Camera Command Interface to interact with a FLIR Lepton over I²C. This protocol controls and queries the camera but is not used to read the images.
image14bit
Package image14bit implements 14-bit per pixel images.
Package image14bit implements 14-bit per pixel images.
internal
Package internal contains code shared between cci and lepton.
Package internal contains code shared between cci and lepton.
Package lirc implements InfraRed receiver support through native linux app lirc.
Package lirc implements InfraRed receiver support through native linux app lirc.
Package mcp23xxx provides driver for the MCP23 family of IO extenders Datasheet https://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf
Package mcp23xxx provides driver for the MCP23 family of IO extenders Datasheet https://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf
Package mcp9808 controls a Microchip MCP9808 digital I²C temperature sensor.
Package mcp9808 controls a Microchip MCP9808 digital I²C temperature sensor.
mcp9808smoketest
Package mcp9808smoketest implements a smoke test for the mcp9808.
Package mcp9808smoketest implements a smoke test for the mcp9808.
Package mfrc522 controls a Mifare RFID card reader.
Package mfrc522 controls a Mifare RFID card reader.
commands
Package commands contains the command that a MFRC522 supports.
Package commands contains the command that a MFRC522 supports.
Package mpu9250 MPU-9250 is a 9-axis MotionTracking device that combines a 3-axis gyroscope, 3-axis accelerometer, 3-axis magnetometer and a Digital Motion Processor™ (DMP) Datasheet https://www.invensense.com/wp-content/uploads/2015/02/PS-MPU-9250A-01-v1.1.pdf https://www.invensense.com/wp-content/uploads/2015/02/MPU-9250-Register-Map.pdf
Package mpu9250 MPU-9250 is a 9-axis MotionTracking device that combines a 3-axis gyroscope, 3-axis accelerometer, 3-axis magnetometer and a Digital Motion Processor™ (DMP) Datasheet https://www.invensense.com/wp-content/uploads/2015/02/PS-MPU-9250A-01-v1.1.pdf https://www.invensense.com/wp-content/uploads/2015/02/MPU-9250-Register-Map.pdf
accelerometer
Package accelerometer contains constants for the MPU9250.
Package accelerometer contains constants for the MPU9250.
reg
Package reg defines constants for the MPU9250.
Package reg defines constants for the MPU9250.
Package nrzled is a driver for LEDs ws2811/ws2812/ws2812b and compatible devices like sk6812 and ucs1903 that uses a single wire NRZ encoded communication protocol.
Package nrzled is a driver for LEDs ws2811/ws2812/ws2812b and compatible devices like sk6812 and ucs1903 that uses a single wire NRZ encoded communication protocol.
Package pca9548 is a driver for an 8 port I²C multiplexer that is available from multiple vendors.
Package pca9548 is a driver for an 8 port I²C multiplexer that is available from multiple vendors.
Package pca9685 includes utilities to controls pca9685 module and servo motors.
Package pca9685 includes utilities to controls pca9685 module and servo motors.
Package piblaster implements interfacing code is piblaster.
Package piblaster implements interfacing code is piblaster.
Package rainbowhat implements interfacing code to Pimoroni's Rainbow hat.
Package rainbowhat implements interfacing code to Pimoroni's Rainbow hat.
Package screen1d implements a 1D display.Drawer that outputs to terminal (stdout) using ANSI color codes.
Package screen1d implements a 1D display.Drawer that outputs to terminal (stdout) using ANSI color codes.
Package sn3218 controls a SN3218 LED driver with 18 LEDs over an i2c bus.
Package sn3218 controls a SN3218 LED driver with 18 LEDs over an i2c bus.
Package ssd1306 controls a 128x64 monochrome OLED display via a SSD1306 controller.
Package ssd1306 controls a 128x64 monochrome OLED display via a SSD1306 controller.
image1bit
Package image1bit implements black and white (1 bit per pixel) 2D graphics.
Package image1bit implements black and white (1 bit per pixel) 2D graphics.
ssd1306smoketest
Package ssd1306smoketest is leveraged by periph-smoketest to verify that two SSD1306, one over I²C, one over SPI, can display the same output.
Package ssd1306smoketest is leveraged by periph-smoketest to verify that two SSD1306, one over I²C, one over SPI, can display the same output.
Package st7567 implements an interface to the single-chip dot matrix LCD Datasheet https://www.newhavendisplay.com/appnotes/datasheets/LCDs/ST7567.pdf
Package st7567 implements an interface to the single-chip dot matrix LCD Datasheet https://www.newhavendisplay.com/appnotes/datasheets/LCDs/ST7567.pdf
Package tlv493d implements interfacing code to the Infineon TLV493D haff effect sensor.
Package tlv493d implements interfacing code to the Infineon TLV493D haff effect sensor.
Package tm1637 controls a TM1637 device over GPIO pins.
Package tm1637 controls a TM1637 device over GPIO pins.
Package unicornhd implements interfacing code to Pimoroni's Unicorn HD hat.
Package unicornhd implements interfacing code to Pimoroni's Unicorn HD hat.
Package waveshare2in13v2 controls Waveshare 2in13v2 e-paper display.
Package waveshare2in13v2 controls Waveshare 2in13v2 e-paper display.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL