No announcement yet.

Single pushbutton multi-function programming of X2 Tech via TAPPS2

  • Time
  • Show
Clear All
new posts

  • Single pushbutton multi-function programming of X2 Tech via TAPPS2

    Programmable single-pushbutton multi-function user input

    For the X2 generation of Technische Alternative freely programmable controllers, I made these two function blocks to allow for an external pushbutton connected to one of the coltroller inputs, to have two different kind of variable control. This makes it possible to have the user select different levels or functions, by simply pressing one simple pushbutton, in different lengths and combinations.

    Get the free TAPPS2 program from the download section of (requires Windows or Linux), and then download the TAPPS2 example file here

    Function Block 1:

    Pressing and holding the pushbutton for 1-10 seconds, gives an output in percent, of 10% 10 100%, in steps of 10 percent.

    This function is useful in case the user should be able to control something, like how hot should the hot water be in the tank, how much should my blinds close and so on. Percent can be changed to other numerical values by adjusting the scaling function.

    Function Block 2:

    One or two subsequent button presses of varying length will set a value to a number between 1 and 16, depending on the length of each button push. Three (or four, really,) basic button pushes are programmed:

    Short press is any press less than 1 second

    Medium press is 2 seconds (1 to 3 seconds)

    Long press is 4 seconds (3 to 5 seconds)

    Pressing longer than 5 seconds is then an extra-long press, which is really the fourth combination. But this is also equal to no press, if it is the second press of a two button press combination. Since the system would not detect no button press as the first press, this function is added.

    These various combinations can be used to control heating, lighting, blinds and so on. For instance, two medium button press sequence could turn all the lights on in the house, while one medium and one short would turn all of them off. One short click turns the nearby light on or off, two short press turn all lights on or off in the room. And so on.

    The function block can be modified with more than two button presses, or more length of button presses. This could be to activate some secret function that you don’t want others to be able to guess, or press by mistake. It could be to unlock an electrically controlled door, an alarm signal and so on. For every addition of one more click, there are four times more combinations, ie 3 clicks = 64, 4 clicks = 256 and so on. At some stage, one would run out of functions the relevant X2 control device could handle! With two pushbutton switches, even further combinations can be made, making it nearly impossible to guess what the “code” is.

    Short click: time <1s

    Middle click ~ 2 seconds: 1s <= time < 3s

    Long click~ 4 seconds: 3s <= time <5s

    Output values are 1 to 16, start value on power-up is 16.

    S S 1

    S M 2

    S L 3

    S 4

    M S 5

    M M 6

    M L 7

    M 8

    L S 9

    L M 10

    L L 11

    L 12

    EL S 13

    EL M 14

    EL L 15

    EL 16

    With “Comparison”, “Logic” or other functions in TAPPS2, various program functions could be turned on, or a digital command sent to the CAN bus for other devices to act upon the result.

    Click image for larger version  Name:	Screenshot 2022-12-14 120252.png Views:	3 Size:	114.1 KB ID:	186

    Last edited by Core; 12-14-2022, 04:41 AM.