V5 Touch buttons on the Zynthian V4 (SOLVED)

I love the touch buttons on the Zynthian V5 Keypad display (right)… But do they work on a DIY Zynthian that doesn’t have pads like the divine V5? I tried selecting it on a Raspberry P4 with a DSI display, when I touch them they animate, but I get no results… Where do I set them? Thanks and sorry…

I do use them on my custom build.

Besides selecting them in the UI options I’ve chosen a custom wiring layout based on the layout called “MCP23017_ENCODERS_V5TOUCH”, so I guess you have to select a corresponding wiring layout?

Thanks, that’s what I wanted to understand… So the touch buttons must be set on the MCP, they don’t work in software.
Would you be so kind as to post the webconf image with your settings? In my Zynthian the MCP is 8 Pin on a pcb made with a cnc, but I’m waiting for a MCP23017… Thanks

I’m actually not really sure about everything.

I don’t think so. I used the seup because I have an MCP with encoders and this wiring option connects both the virtual buttons (with -1) and the MCP (with wiringpi numbers.

If you don’t have the MCP I guess this could work?

        "TOUCH_ONLY": {
            'ZYNTHIAN_WIRING_ENCODER_A': "-1,-1,-1,-1",
            'ZYNTHIAN_WIRING_ENCODER_B': "-1,-1,-1,-1",
            'ZYNTHIAN_WIRING_SWITCHES': "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1",
            'ZYNTHIAN_WIRING_MCP23017_INTA_PIN': "",
            'ZYNTHIAN_WIRING_MCP23017_INTB_PIN': "",
            'ZYNTHIAN_WIRING_ZYNAPTIK_CONFIG': "",
            'ZYNTHIAN_WIRING_ZYNAPTIK_ADS1115_I2C_ADDRESS': "",
            'ZYNTHIAN_WIRING_ZYNAPTIK_MCP4728_I2C_ADDRESS': "",
            'ZYNTHIAN_WIRING_ZYNTOF_CONFIG': ""

So as far as I understand, they need to be configured with 'ZYNTHIAN_WIRING_SWITCHES': "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1", and a good configuration start would be these two settings, depending on if you have encoders (start from MCP23017_ENCODERS_V5TOUCH) or not (start from TOUCH_ONLY).

I don’t have access to my zynth right now but my setup is derived from this:

        "MCP23017_ENCODERS_V5TOUCH": {
            'ZYNTHIAN_WIRING_ENCODER_A': "102,105,110,113",
            'ZYNTHIAN_WIRING_ENCODER_B': "101,104,109,112",
            'ZYNTHIAN_WIRING_SWITCHES': "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,100,103,108,111",
            'ZYNTHIAN_WIRING_MCP23017_I2C_ADDRESS': "0x20",
            'ZYNTHIAN_WIRING_MCP23017_INTA_PIN': "0",
            'ZYNTHIAN_WIRING_MCP23017_INTB_PIN': "2",
            'ZYNTHIAN_WIRING_ZYNAPTIK_CONFIG': "",
            'ZYNTHIAN_WIRING_ZYNAPTIK_ADS1115_I2C_ADDRESS': "",
            'ZYNTHIAN_WIRING_ZYNAPTIK_MCP4728_I2C_ADDRESS': "",
            'ZYNTHIAN_WIRING_ZYNTOF_CONFIG': "",
            'ZYNTHIAN_WIRING_LAYOUT_CUSTOM_PROFILE': 'v5'
            },

So mine is almost like above, only changes to the >100 numbers ZYNTHIAN_WIRING_ENCODER/SWITCHES’: which are the wiringpi numbers of the MCP A/B pins and other GPIO pins for the INTA_PIN and INTB_PIN, if applicable.

So note you need these other 20 “-1” configured.

So -1 stands for touch button and then you set the function to Webconf?

I don’t know the nomenclature what -1 really means but it indicates there is something to configure, but it’s not at any hardware connection. So, I’d say yes. If you choose one of the wiring layouts chances are good that the functions are already set.

-1 means not conected, i.e. it defines a button that has no physcial GPI connection. It is required for touch buttons because each touch button is mapped to a virtual switch so those virtual swiches need to be defined.

Perfect! Thanks @hannesmenzel and @riban… I’m trying now, should I select the “UI Action Push” item on the dropdown menu? or what else? Thanks.

I think if you start from any fresh wiring profile the 24 controls with the assigned actions should already work as intended. So you would just change anything if your virtual button should have any other function than intended.

You want to show your setup?

Certainly:

I now only have the encoder buttons connected to the MCP and I have two separate buttons to PLAY and STOP MP3 audio files.

I don’t know the behaviour of the customizable switches fields. Do they append dynamically? Maybe changing to MCP23017_ENCODERS_V5TOUCH and start with “3,27,5,6,” “2,25,4,14” “-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,100,101,102,103,104,105,106” would work. But probably “custom” will be your profile.

With the default settings for V5, the touch buttons work but only with the mouse… if I touch the display, the buttons react but do not send any message…

Yes, my profile is CUSTOM, but this does not change even if it is on “DUMMIES”. This screenshot is old… now I have set CUSTOM.

How does your UI config look like?


This is my current setup. ENCODERS-A and ENCODERS-B are connected directly to the GPIO. The 4 encoders buttons are connected to the MCP which has 8 pins. The remaining two buttons (also connected to the MCP) are for PLAY and STOP of MP3 songs.

Thanks @wyleu:blush:

With this setup, it also works with the touchscreen… Now I should try on the Zynthian because I’m testing on a raspberry without MCP and without encoders…

Cool! What I don’t know is how the “Customization Profile” affects the Switches configuration below. You got V4 Studio selected but V5 Button assignments work?

I just brought this setup back to the full Zynthian… Everything works but the 4 encoder buttons don’t work…