Hello,
I downloaded your code to test in ESP8266. the result is always "0 0 False" or "0 0 True". Could you please check how to get the correct result?
By the way, ESP8266 doesn't have pin 35 in your example. I used GPIO 12 to do the test.
Thanks a lot
0 0 False
0 0 False
0 0 False
0 0 True
0 0 True