Quote
# Set up GPIO 4 and set to output
echo "4" > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio4/direction
# Set up GPIO 7 and set to input
echo "7" > /sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio7/direction
# Write output
echo "1" > /sys/class/gpio/gpio4/value
# Read from input
cat /sys/class/gpio/gpio7/value
end quote
Its to talk to the GPIO
Now what I want to do is to input a Hi or Lo one one pin port of the GPIO and output it to another (and apply some delay(other processes) to the data.
now this line has got me stuck.
cat /sys/class/gpio/gpio7/value
where where does the read data wind up ? If I write a line
let x='read data'
clearly 'read data' isn't going to work and the data is going to be a '1' or a '0'
Is it as simple as
let x="in"
?
*** as a beginner with this level of BASH, I very uncertain of where I should look for a solution to what is probably a very simple solution.
Any thoughts very welcome !
