GPIO_Ports
Remember - GPIO ports are 3.3v level!
They can be controlled at the command line level using file system commands for the Pi.
Basic commands:
To INITIALIZE a port:
echo 11 > /sys/class/gpio/export
The above command sets up the file structure for GPIO port 11
To REMOVE a port:
echo 11 > /sys/class/gpio/unexport
To set the DIRECTION of a port:
echo out > /sys/class/gpio/gpio11/direction
echo in > /sys/class/gpio/gpio11/direction
To WRITE to a port:
echo 1 > /sys/class/gpio/gpio11/value
echo 0 > /sys/class/gpio/gpio11/value
To READ a port:
cat /sys/class/gpio/gpio11/value
Above commands all tested and verified. GPIO number matches breakout number ("gpioXX"), not pin number of the connector.
Not really sure why one would need to "unexport" a pin.