GPIO 18 is not responding


#1

Hello, I have installed the provided version of Raspbian for the Balena fin, but cannot figure out how to make to GPIO works.
For example if we want to turn the GPIO to 1, one can do:

gpio mode 18 out
gpio write 18 1

I have also tried with 12 as GPIO 18 is on pin 12, but nothing seems to make it works.
Should something be installed, in order for the GPIO to work ?


#4

Hi @mrrobot

You can access the GPIOs via sysfs - example below.

sudo echo 18 > /sys/class/gpio/export
sudo echo out > /sys/class/gpio/gpio18/direction 
sudo echo 1 > /sys/class/gpio/gpio18/value

Let me know if this works for you!