Raspberry Pi - Web Server and API
Examine this Flask route intended to toggle GPIO pin 22:
@app.route('/flip')
def flip_pin():
current_state = GPIO.input(22)
GPIO.output(22, not current_state)
return 'Pin toggled'What is the main issue with this code?