Hey! I'm trying to work the GPIO with a 220V power relay and C++.
I'm working with this guide: http://hertaville.com/introduction-to-a ... -in-c.html
Trying the shell commands first to get to know how to work with the GPIO.
However, the following command: 'echo "out" > /sys/class/gpio/gpio4/direction'
actually turns on the pin, even before i do the 'echo "1" > ... value' command. and I can't seem to turn it off properly. sometimes it will turn off when I do the opposite command: 'echo "in" > sys/class/gpio/gpio4/direction'.
any idea why these commands trigger the pin to go on/off? I thought it was only a settings command and the next one (echo "1" /sys..../value) should be turning it on.