Debian 12 on Pi4. Python code to toggle gpio pins works in the repl but crashes flask web server.

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/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.

Post by /RaspberryPi »


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
Post Reply

Return to “Raspberry Pi Forum”