added in GPIO led functionality

This commit is contained in:
Dave committed 2018-10-11 18:57:23 +01:00
1 parent f13802a62b
commit 56491b7ab0
3 files changed
+106 -6

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
source ./gpio
function blink()
{
local pin=$1
local speed=$2
while :
do
gpio write $pin 1
sleep $speed
gpio write $pin 0
sleep $speed
done
}
# Just invoke our function if the script is called directly
if [ "$BASH_SOURCE" == "$0" ]; then
gpio mode $1 out
blink $@
fi