ModMyPi MCP23017 pHAT

No, I mean in the webconf, under hardware, there’s a page calles ‘kit’ or something like this

Hmmm… This is even more confusing for me. Although i wired my rotaries like the kits do, they have extra components such as the midi inputs and outputs that I don’t have. I thought I should use “custom” at that menu, and then set the correct mcp23017 and corresponding values on the “wiring” menu.

I will try the kit settings now. Thanks.

Edit :- Nope… using “kit” instead of “custom” is very bad. It sets the screen and the soundcard to kit options, which are not the same as mine.

  • kit V3-pro is corresponding to mcp23017 zynscreen
  • kit V3 is corresponding to mcp23017 (encoders or extra if you use extra switch on the 4 mcp23017 pins that are not used by the encoders)

the “kit” settings also force the screen and audiocard options, so I have to use “custom”

Go custom.

Encoder A: 102,105,110,113
Encoder B: 101,104,109,112
Switch: 100,103,108,111,106,107,114,115 (the 4 last for extra switches)
these are for V3 (like the all in one board) and V3 pro (zynscreen)

If you wired it as the all in one schematic:
IntA : gpio 27 - pin 36
IntB : gpio 25 - pin 37

I now have two red encoders that seem to be responding to Interrupts on GPIO23 & GPIO14, that happen to coincide with MIDI event from the keyboards. Very pleasantly interactive !!

Yeah I was trying to work out what the numbers mean (except for that I have something wrong)

MCP23017 Zynscreen has the following settings… (does it have 4 more buttons as well?)

Encoders A-pins:
102,105,110,113

Encoders B-pins:
101,104,109,112

Switches Pins:
100,103,108,111,106,107,114,115

So we have 16 pins in the game and if I presume 100 is our start address and count the pins up. Is this how it works?

100 - ctrl-1 2 - GPA0 - Switches Pins
101 - ctrl-1 3 - GPA0 - Encoders B-pins
102 - ctrl-1 4 - GPA0 - Encoders A-pins
103 - ctrl-2 2 - GPA0 - Switches Pins
104 - ctrl-2 3 - GPA0 - Encoders B-pins
105 - ctrl-2 4 - GPA0 - Encoders A-pins
106 - sw-1 2 - GPA0 - Switches Pins extra
107 - sw-1 3 - GPA0 - Switches Pins extra

108 - ctrl-3 2 - GPB0 - Switches Pins
109 - ctrl-3 3 - GPB0 - Encoders B-pins
110 - ctrl-3 4 - GPB0 - Encoders A-pins
111 - ctrl-4 2 - GPB0 - Switches Pins
112 - ctrl-4 3 - GPB0 - Encoders B-pins
113 - ctrl-4 4 - GPB0 - Encoders A-pins
114 - sw-1 4 - GPB0 - Switches Pins extra
115 - sw-1 5 - GPB0 - Switches Pins extra

so I clearly have something wrong.


These are the settings i just tried, and i got no results at all.


The wiring diagram for my hat. The board does not connect the interrupts itself. If I connect the interrupts to 36 and 37 my pi wont boot at all.


These are the labels on my rotary encoders. I thought I should be connecting the switches to 106, 107, 114 and 115 but maybe I should be connecting to 100,103,108 and 111? I have the grounds all connected. Do I need to connect the +ve too?

I really don’t want to have to submit and buy the original zynthian board and controllers, or use all my pi gpio pins directly either. :pleading_face:

No you don’t have to, and have a look here to identify the encoders pins:

Webonf pins configuration is okay.

Good Luck

Still no joy. Guess I have given up. I ordered a V3 board from zynthian.

It arrived!

Pins all bent up though… Hope I can fix them up ok.

I suppose I need to figure out how to use this now, as well.

1 Like

@MrBroccoli Are you using Digital in’s and outs with this zynaptik board?

If so what are your current repo settings, and how close to sooperlooper integration are you into this overall sketch?

Currently, no.

I don’t remember receiving any paperwork…?

Aug 23 13:13:09 zynthian-pedal startx[499]: gpio: Unable to open GPIO direction interface for pin 7: No such file or directory
Aug 23 13:13:09 zynthian-pedal startx[499]: wiringPiISR: unable to open /sys/class/gpio/gpio7/value: No such file or directory

ZynCore: Setting-up 8 x Zynswitches…
ZynCore: Setting-up 4 x Zynpots (zyncoders)…
ZynCore->setup_zyncoder(0, 0, 0): Can’t configure zyncoder on a single pin!
ZynCore->setup_zyncoder(1, 0, 0): Can’t configure zyncoder on a single pin!
ZynCore->setup_zyncoder(2, 0, 0): Can’t configure zyncoder on a single pin!
ZynCore->setup_zyncoder(3, 0, 0): Can’t configure zyncoder on a single pin!