button_press_once.py

Here we use a more complex if structure to identify a button press: we check to see if the button is currently pressed and if the current value of the button is different than the previous value (prev_val). Send the following example to your ESP32.

Code

'''
but...