hi everyone, i’m a newbie. I have a bpi r64 and want to research about gpio pins. easy example : control leds. i installed linux in Bpi and want to control passed interface /sys/class/gpio.I guess that output GPIO is 5 V. So, I connected GPIO 22 -> resistor (330 Ohm) -> (+) led -> (-) led -> GND (in GPIO 20). Now, i perform :
echo 431 (22 + base GPIO409 ) > export
cd /gpio431
3 . echo out > direction
echo 1 > value
Why doesn’t my leds light ? What step am i failed ? Or What things i understand wrong ? sorry and tks everyone
Tks bro. I performed same your step. It’s dark. I see you write that : “The sysfs interface (/sys/class/gpio/…) needs kernel-option CONFIG_GPIO_SYSFS”. I think my problem doesn’t config. How to check status config or how to config ? Tks you.
I guessed that,but maybe it’s 5v…have not found time to measure it
If you use my kernel (e.g.5.4) all options should be enabled. The error is an example for other kernels as hint
You can use zgrep pattern /proc/config.gz after loading configs module
You add 22…which gpio do you want to control? Pin-number is not gpio number…see table in my wiki (all gpio with numbers above 50). Pin 22 = gpio 63…here you need to check if spi0 is disabled (in devicetree) or you will get error, on blocked gpio
yeah, thanks to support. i try to test GPIO with : Getting Started with R64 - Banana Pi Wiki (banana-pi.org) . their example : control GPIO 22 by : plus with GPIO base (GPIO409 ) . tks u. tomorrow I will try your way. Thank u so much.
Change build.conf to r64 (i guess official image uses legacy way so only change board)
install depencies and use build.sh to build/install to sdcard (not fit), add kernel/fdt entry to uenv.txt
as legacy way has separate dtb and you only change dtb it is maybe easier to replace only dtb
seems to be official source for kernel 5.4 for r64…there is a build.sh, you need to compile full kernel (as dtb is done while compile kernel), but only replace dtb
alternatively you can use my debian-image and compile my kernel, as it is up-to-date
This image uses new way (fit) here you need to enable arch too in build.conf and install fit