Skip to content

Instantly share code, notes, and snippets.

View abejaranoh's full-sized avatar

Alexander Bejarano abejaranoh

View GitHub Profile
@abejaranoh
abejaranoh / gpio.sh
Created March 25, 2017 13:52 — 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