Skip to content

Instantly share code, notes, and snippets.

@bgrissin
bgrissin / gpio.sh
Created December 21, 2016 11:28 — forked from jefflarkin/gpio.sh
BASH functions for using the C.H.I.P. GPIO pins.
#!/bin/bash
#FIXME Add usage() function to improve documentation
# Enable exposure of the specified GPIO pin (0-8)
gpio_enable()
{
if [[("$1" -lt 0) || ("$1" -gt 8)]] ; then
echo "Valid pins are 0-8"
return -1;
fi