Go Down

Topic: while code to wait for an event (Read 69 times) previous topic - next topic


Hi everyone!
My project is to build a mouse with an ESP32 board,  sending data to the pc through bluetooth.
I am currently trying to convert the input of a sensor (flex sensor), into the mouse events, but I can't figure out what is wrong with the code.
In particular, the aim is that, when the sensor is bend, you are clicking the left button, and than you have to wait for the sensor to be in rest position to release the button. I was trying to do this with a while loop, that waits the senor to be in rest position, but it doesen't work:
 It goes in infinite loop or


I can't figure out what is wrong with the code.
Nor can anyone else unless they see it

Did you Read this before posting a programming question ?
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Go Up