maybe some other process intervenes? (Arduino sketch, XDK, ...)
BTW: you might be interested using mraa rather than directly accessing sysfs?
1 of 1 people found this helpful
To change the value of the IO pins I run the commands below. This example is for the IO9.
# # Set IO9 as output # echo 183 > /sys/class/gpio/export # IO9 echo 257 > /sys/class/gpio/export # Output enable (high = output) echo 225 > /sys/class/gpio/export # Pull-up enable echo 214 > /sys/class/gpio/export # Tri-State (set it low before configure the rest, then set it high) echo low > /sys/class/gpio/gpio214/direction # Set Tri-State to low echo high > /sys/class/gpio/gpio257/direction # Set gpio183 as output (Output enable = high) echo mode0 > /sys/kernel/debug/gpio_debug/gpio183/current_pinmux # Set the pin as gpio mode echo out > /sys/class/gpio/gpio183/direction # Set the gpio pin as output echo high > /sys/class/gpio/gpio214/direction # Set the Tri-State to high # To write high: echo 1 > /sys/class/gpio/gpio183/value # To write low: echo 0 > /sys/class/gpio/gpio183/value
You can find more details about the GPIO configuration here: EmutexLabs
It is hard to tell from your post, enough information to help.
For example is this an Arduino board or a mini board or other?
Since you are using sudo, again not sure what linux you are using and/or what version?
Not sure which pin. Would have helped if you showed actual input/output of your commands, so for example we could see what your current directory is.
Have you tried doing your echo and cat with fully qualified path names? /sys/class/gpio/gpio???/value