Erik Sjödin wrote: > I have now looked in to the provided scripts(Button.sh). > > So for every GPIO in needed, if "exported" and direction defined: > echo "$PIN" > /sys/class/gpio/export > echo "in" > /sys/class/gpio/gpio$PIN/direction > > Is it then safe to assume that the value in > /sys/class/gpio/gpio$PIN/value will be automatically changed (0 or 1) if > button is pushed or released depending on the direction, if wired > correctly? > > In the amp_relay.sh it seems like the /sys/class/gpio/gpio$PIN/value is > manually changed by echo either 0 or 1 depending on the presense of a > media streams artist tag or not. I assume if the value if toggled to > on/1 the rasberry will start to apply power to AMP over its GPIO pin? > > BR > Erik
Hi Erik Sjödin, Yes and yes. One is an example of an input and the other an output. There is a lot of examples on the internet on Raspberry Pi GPIO's but most of them talk about Python and/or wiringPi. We wanted to avoid loading any more modules or libraries. The amp_relay.sh was included because it shows how to overcome access to some of the directories. It is very close to the real working example. If you go back in the thread you will see links to Pink Fish Media where this was implemented. regards Greg ------------------------------------------------------------------------ Greg Erskine's Profile: http://forums.slimdevices.com/member.php?userid=7403 View this thread: http://forums.slimdevices.com/showthread.php?t=97803
_______________________________________________ unix mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/unix
