Debian 12 on Pi4. Python code to toggle gpio pins works in the repl but crashes flask web server.
- /RaspberryPi
- Corporate
- Posts: 2449
- Joined: Wed Jun 05, 2019 1:29 am
Debian 12 on Pi4. Python code to toggle gpio pins works in the repl but crashes flask web server.
Heres a post in r/learnpython that shows the code and error stack if you want:
https://reddit.com/r/learnpython/s/GRJBzvtwQK
I changed the group permission of /dev/gpiochip0 to gpio and added my pi user to that group. Im running the flask server as pi. Like it said, it works fine just loading it into the repl but fails in flask in the same
Any ideas?
submitted by /u/Mach_Juan
[link] [comments]
Source: https://www.reddit.com/r/raspberry_pi/c ... gpio_pins/
/RaspberryPi