linux - GPIO output value not changing -


i trying setup output gpio pin on nitrogen6x board, can't change file value. navigated /sys/class/gpio/ , exported pin (gpio18) echo 18 > export. able change direction command echo out > direction , seems should able change value file same way, echo 1 > value, doesn't seem working. logged in root , permissions on both direction file , value file same: -rw-r--r-- 1 root root.

does have idea why not writing file?

thanks of help!

the commands have listed should work, if gpio number correct. while have not worked nitrogen6x in particular, have found out linux gpio pin numbers not match labels on board. advice trying find out proper mapping experimentally watching possible gpios:

cd /sys/class/gpio x in `seq 1 128`; echo $x > export; done 

ground pin in question via 10k resistor, run:

grep . gpio*/value > /tmp/values0 

connect pin in question vcc via 10k resistor, run:

grep . gpio*/value > /tmp/values1 

diff files, , pay attention pin has changed.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -