add a python program which can detect button input as an interrupt