Tinker Board Forum

Full Version: Reset Gpio help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi
i am try to run this commands and 

# Reset iC880a PIN
SX1301_RESET_BCM_PIN=25
echo "$SX1301_RESET_BCM_PIN"  > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio$SX1301_RESET_BCM_PIN/direction
echo "0"   > /sys/class/gpio/gpio$SX1301_RESET_BCM_PIN/value
sleep 0.1
echo "1"   > /sys/class/gpio/gpio$SX1301_RESET_BCM_PIN/value
sleep 0.1
echo "0"   > /sys/class/gpio/gpio$SX1301_RESET_BCM_PIN/value
sleep 0.1
echo "$SX1301_RESET_BCM_PIN"  > /sys/class/gpio/unexport



 I am getting this error 

start.sh: line 6: echo: write error: Invalid argument
start.sh: line 7: echo: write error: Operation not permitted

start.sh: line 9: echo: write error: Operation not permitted
start.sh: line 11: echo: write error: Operation not permitted



I need some help for making this works

Best, regards
which pin do you want to control?
I cannot find 25 this GPIO pin (SoC/CPU pin number)
https://tinkerboarding.co.uk/wiki/index.php/GPIO

e.g. if you want to use GPIO physical pin number 22. you need to control it by 171.
and you need to run those commands with root. or use sudo.
Yes, I think is the GPIO physical pin number 22, what do you mean by 171?
Should I replace this number in the command?
SX1301_RESET_BCM_PIN=171 ? something like this?
you can reference this table...control by CPU internal pin number
[Image: Gpio-table.png]

and yes replace pin number you need in the command.