This includes how to control led using push button with VisionFive. Reading inputs at VisionFive GPIOs.
This includes Python Code.
All details with circuit diagram, python file, github link, and videos is uploaded on this link.
Plz Check it out if you have any queries or Suggestions then plz ask it out.
trying your setup and code with last Ubuntu 22.04.1 LTS image, i first get an error executing that line :
chip = gpiod.Chip('gpiochip0') with the error : “No such file or directory”.
That was strange, as the gpiodetect was listing gpiochip0 (and also gpiochip1, names shortened) as expected.
So checking the filesystems, i found a “real” path beeing ‘/dev/gpiochip0’, so i change the above line to
chip = gpiod.Chip('/dev/gpiochip0') and from then i was able to control the pin 40 to light on/off the LED of the schematic.
Reading a stable input from pin 38 (connected to button) is still erratic but it s more my wires that are not well set i think (so out of line here ;-)).