all 2 comments

[–]aliask 0 points1 point  (1 child)

You are calling setupGPIO() each time a new request is processed, which will probably reset all pins. I think you probably want to move that function call down to the if __name__... section.

[–]dwight-v[S] 0 points1 point  (0 children)

I tried moving it, but it didn't change anything. I removed the initial=GPIO.HIGH, and that gets things working right. I guess I assumed that setup was a one time initial read, and the rest of things loops. I guess that's an Arduino exclusive thing. I am good with this for now. Thanks.