Install and control custom leds on GPIO in raspberry pi 4

Hello,

Currently I have a bi color 3 lead common anode led connected as below to raspberry pi 4 running openwrt 24.10.2,

common anode - 3.3v
cathode1 - GPIO2
cathode2 - GPIO3

and use command gpioset -c gpiochip0 -z 2=<0 or 1> 3=<0 or 1> to control the led.

I run a custom script to check internet connectivity by pinging google.com and use above command in the script to show the status on led.

Is the same doable using Luci->System->LED Configuration? I went through https://openwrt.org/docs/guide-user/base-system/led_configuration and did not see any example for my use case.

Thanks.

1 Like