First version of button-sensor.c