I have a Vocore with Dock v2. I'm trying to make a doorbell that sends me a notification that someone rings the doorbell. But I'm having problems changing the value of GPIOs on the Vocore:
List all GPIO, their direction and value
- Code: Select all
root@OpenWrt:~# cat /sys/kernel/debug/gpio
GPIOs 0-21, platform/10000600.gpio, 10000600.gpio:
gpio-0 (gpio0 ) in hi
gpio-12 (gpio12 ) in hi
gpio-13 (gpio13 ) in hi
gpio-17 (gpio17 ) in lo
gpio-18 (gpio18 ) in lo
gpio-19 (gpio19 ) in lo
gpio-20 (gpio20 ) in lo
gpio-21 (gpio21 ) in hi
GPIOs 22-27, platform/10000660.gpio, 10000660.gpio:
gpio-22 (vocore:green:status ) out hi
gpio-23 (gpio23 ) in lo
gpio-24 (gpio24 ) in lo
gpio-25 (gpio25 ) in hi
gpio-26 (vocore:orange:eth ) out hi
Confirming state of GPIO0
- Code: Select all
root@OpenWrt:~# cat /sys/class/gpio/gpio0/direction
in
root@OpenWrt:~# cat /sys/class/gpio/gpio0/value
1
Attempting to set GPIO0 value to 0 (low)
- Code: Select all
root@OpenWrt:~# echo 0 > /sys/class/gpio/gpio0/value
ash: write error: Operation not permitted
Attempting to set GPIO19 value to 0 (low)
- Code: Select all
root@OpenWrt:~# echo 0 > /sys/class/gpio/gpio19/value
ash: write error: Operation not permitted
I've also connected GPIO0 to a circuit powered by the 3.3V pin and a simple button. I've tried both pull down and pull up resistors. But pressing the button does not change the GPIO value. I tried the same thing on GPIO19.
Any ideas on what I'm doing wrong?
Allan