Adding whenPressedCall and whenPressedDigitalSwitch methods
Adding setHoldDelay method for customize the time wait for state change