Find file History
Permalink
..
Failed to load latest commit information.
apa102 conn/display: simplify Drawer Jun 26, 2018
bmxx80 Update use of frequency to use physic.Frequency Jun 1, 2018
cap1xxx cap1xxx: move out of experimental Jul 3, 2018
gpio-list cmd: enable optional use of periph.io/x/extra/hostextra.Init() Apr 17, 2018
gpio-read cmd: enable optional use of periph.io/x/extra/hostextra.Init() Apr 17, 2018
gpio-write cmd: enable optional use of periph.io/x/extra/hostextra.Init() Apr 17, 2018
headers-list cmd: enable optional use of periph.io/x/extra/hostextra.Init() Apr 17, 2018
i2c-io Update use of frequency to use physic.Frequency Jun 1, 2018
i2c-list cmd: enable optional use of periph.io/x/extra/hostextra.Init() Apr 17, 2018
ir Reduce number of errcheck lint messages from 117 to 2. Dec 22, 2017
led cmd: make flag processing more coherent (#214) Jan 4, 2018
lepton Update use of frequency to use physic.Frequency Jun 1, 2018
onewire-list cmd: enable optional use of periph.io/x/extra/hostextra.Init() Apr 17, 2018
periph-info cmd: enable optional use of periph.io/x/extra/hostextra.Init() Apr 17, 2018
periph-smoketest travis: enforce strict dependency tree; conn: move out all smoketests Jun 26, 2018
spi-io Update use of frequency to use physic.Frequency Jun 1, 2018
spi-list cmd: enable optional use of periph.io/x/extra/hostextra.Init() Apr 17, 2018
ssd1306 conn/display: simplify Drawer Jun 26, 2018
thermal devices: Move interfaces and structs into physic May 27, 2018
tm1637 cmd: enable optional use of periph.io/x/extra/hostextra.Init() Apr 17, 2018
README.md cap1xxx: move out of experimental Jul 3, 2018
doc.go cmd: improve documentation Apr 17, 2018

README.md

periph/cmd - read-to-use executables

This directory contains directly usable tools installable via:

go get periph.io/x/periph/cmd/...

Most of the tools can optionally leverage drivers in hostextra when the build tag periphextra is defined:

go get -u -tags periphextra periph.io/x/periph/cmd/...

This permits taking advantage of drivers like FTDI's D2XX.

Push

If you prefer to build on your workstation and push the binaries to the micro computer, install push from periph.io/x/bootstrap to cross compile and efficiently push via rsync:

go get -u periph.io/x/bootstrap/cmd/push
push -host pi@raspberrypi periph.io/x/periph/cmd/...

Recommended first use

Try first periph-info. It will print out if any driver failed to run, for example if you have to run as root to access certain drivers.

Then run headers-list to list all the headers on your board and confirm that you get the expected output. If your board is missing, you can contribute it.

Devices

  • apa102: Writes to a LED strip of APA-102 (sometimes called Dotstar). Can show an image animating on the Y axis.
  • bmxx80: Reads the temperature, pressure and humidity off a bmp180/bme280/bmp280. Humidity sensing is only supported on bme280.
  • cap1xxx: Reads the capacitive sensor family.
  • ir: Reads codes (button presses) on an InfraRed remote sensor.
  • led: Reads the state of on-board LEDs.
  • ssd1306: Writes text, an image or an animated GIF to an OLED display.
  • tm1637: Writes to a segment digits display.

Buses

  • gpio-list: Looking for the GPIO pins per functionality? Prints the state of each GPIO pin.
  • gpio-read: Read the input value of a GPIO pin and change input resistor.
  • gpio-write: Change the output value of a GPIO pin.
  • headers-list: Pinrts the location of the pin on the header to connect your GPIO. This is the perfect tool to know where to connect the wires.
  • i2c-io: Reads and/or writes to an I²C device.
  • i2c-list: Lists which I²C buses are enabled and where the pins are.
  • spi-io: Reads and/or writes to an SPI device.
  • spi-list: Lists which SPI ports are enabled and where the pins are.

Other

  • periph-info: Lists which periph drivers loaded and which failed.
  • periph-smoketest: Runs one of the smoke test for the drivers. The smoke test differs from unit tests as they require real hardware to confirm that the driver being tested works.

Troubleshooting

Having trouble getting the tools to run? File an issue or better visit the Slack channel. You can get an invite here.