Working Python script (button.py). Next step is converting to C for external.