GPIO classes for controlling GPIO pins and PWM
Using WiringPi (gpio command) for PWM and
sysfs control using file descriptors for control of pin read/write
Requires a tweak to the Pi SD card image to install gpio
Includes a bash script to turn LEDs on and off
Change-Id: Iaa254e026db336b09758d24eb1ddcffccfb27655
Signed-off-by: Jim Ostrowski <yimmy13@gmail.com>
diff --git a/frc971/raspi/rootfs/target_configure.sh b/frc971/raspi/rootfs/target_configure.sh
index db3fb36..6d9171e 100755
--- a/frc971/raspi/rootfs/target_configure.sh
+++ b/frc971/raspi/rootfs/target_configure.sh
@@ -41,6 +41,14 @@
libnice-dev \
feh
+# Install WiringPi gpio for PWM control
+if [[ ! -e "/usr/bin/gpio" ]]; then
+ cd /tmp
+ git clone https://github.com/WiringPi/WiringPi.git
+ cd WiringPi
+ ./build
+fi
+
echo 'GOVERNOR="performance"' > /etc/default/cpufrequtils
# Add a .bashrc and friends for root.