GPIO http://www.armbedded.eu/node/258 echo 93 > /sys/class/gpio/export You decide whether a pin is an input or an output by writing in/out to /sys/class/gpio/gpio[ID]/direction. A GPIO's value can be read or set by accessing the file /sys/class/gpio/gpio[ID]/value. PB29: echo 93 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio93/direction echo 0 > /sys/class/gpio/gpio93/value pinout p19 *((unsigned long *) (map_base + (PIOB_SODR & MAP_MASK))) = PIO_B27; http://armbedded.org/node/309 Hi, in Linux there is some kind of generic GPIO handling. First you need to know the Linux internal GPIO number of the pin to use. Here some example to do that with PA26 (Buzzer). In arch/arm/mach-at91/include/mach/gpio.h you can find the pin definitions for the at91. Here PA26 is defined as #define AT91_PIN_PA26 (PIN_BASE + 0x00 + 26) PIN_BASE is 32 (some grep trough the sources will help). so the Linux internal pin number of PA26 is 32+26=58. Login into your board and cd to /sys/class/gpio. Then do a "echo 58 > export" here. This will export the PA26 gpio line from kernel space to user land. Then cd into the new directory gpio58. Here you will find the gpio pin control items. Do an "echo out > direction" to configure the pin as output. Now it can be altered by "echo 1 > value" and "echo 0 > value" (some click noise is made then by the buzzer). ======================================================== buzzer PA26 echo 58 > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio58/direction echo 0 > /sys/class/gpio/gpio58/value echo 1 > /sys/class/gpio/gpio58/value ======================================================== http://armbedded.org/node/420 Tried power saving http://www.armbedded.eu/node/372 echo "" > /sys/class/rtc/rtc0/wakealarm echo "+20" > /sys/class/rtc/rtc0/wakealarm echo mem > /sys/power/state 1) works with NanosG20 and LogitechC510 webcam. Power use 0 W from mains. 2) Does not work with Huavei E1750 surf stick. Power consumed during power down = 1 W. 3) Does not work with RTL8187 stick. Power consumed with power down = 1.3W. May be there is still some software method? or I could try in hardware to switch off USB 5 V power with GPIO and external transistor. You can toggle pin PA27 to switch off the 5V supply for USB (low is on, high is off). You can use this method to do it: http://armbedded.eu/node/258 Thanks a lot for supprt! Very smart feature! Will print out and study Nanos schematics. This controls USB power: echo 59 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio59/direction echo 0 > /sys/class/gpio/gpio59/value # +5V on echo 1 > /sys/class/gpio/gpio59/value # +5V off The value is not preserved after restart, but it is not a problem to set it every time. ----------------------------------------------------------- connecting PIR motion detector to pin 14 of X11 X11 pin10 GND pin12 +5V pin14 PB14 64+14=78 echo 78 > /sys/class/gpio/export echo "in" > /sys/class/gpio/gpio78/direction cat /sys/class/gpio/gpio78/value input works