I am trying to turn on and off an LED with sysfs. I have my LED connected on Milk-V Duo Pin 1. From my understanding the physical pin is XGPIOA[28]. I tried the following
echo 448 > /sys/class/gpio/export # At this time, generate the /sys/class/gpio/gpio448 directory.
echo out > /sys/class/gpio/gpio448/direction # Reconfigure IO direction as output:
echo 1 > /sys/class/gpio/gpio448/value # Light the LED
echo 0 > /sys/class/gpio/gpio448/value # Turn off LED
echo 448 > /sys/class/gpio/unexport # Release GPIO resources
from my understanding the XGPIOA[28] is in 480 - XGPIOA[0] not sure if I understand correctly. When I run the above the LED doesn’t light up or light down. Note: The connection of the LED is the following
LED Anode is connected to Pin1 in the Milk-V Duo board. LED Cathode is connected to a resistor and to the Ground. Also when I start the board the LED is always turned on. Thanks