Full-colour RGB 4x4 button pad (monome-esque)

big93, all of the connections are defined in the code, in the defines and variables at the top. It may be different in different examples I have posted, so look at the code you're using and either use those pins, or change the defines to meet your needs. I long ago disassembled my version of the project, so this code is all I have to go on myself.

Here are the relevant lines from the "color fading" example, and an explanation of what they're saying. The first three must not be changed, since they're hardware features of the SPI, and make sure you're using Arduino pin 10 as an OUTPUT only, otherwise it will mess up the hardware SPI, too. Other than that, they can all be changed.

The data connections for the digital pot (can't be changed):

#define DATAOUT 11//MOSI (pin 7 of AD5206)
#define DATAIN 12//MISO - not used, but part of builtin SPI
#define SPICLOCK  13//sck (pin 8 of AD5206)

The LED "row" select, and the two slave select lines for the digital pot. Also, the defined function "slavesel" chooses which digital pot to send the data based on the pot register numbers.

#define slavesel(x) ((x<6) ? 0 : 1)
const byte rowpin[ROWS] = {
  14,15,16,17};
const byte slaveselect[2] = {
  10, 18};

The pins for writing to and reading from the buttons.

const byte buttonRead[4] = {
  5, 2, 3, 4}; //Pins for the Vin of the buttons
const byte buttonWrite[4] = {
  6, 7, 8, 9}; //Pins for reading the state of the buttons

All of the above refer to Arduino pins. Pins 14, 15, 16, and 17 are analog pins 0, 1, 2, and 3, respectively.

The following code does not refer to Arduino pins, it refers to which digital pot registers to which the various color lines are connected. The "slavesel" function below is used to choose which chip the number refers to (the first chip if the number is 0-5, and the second if it is 6-11), and a modulo function (% sign) is used to shift the numbers higher than 5 down to make sense when talking to the chip.

// The pot register numbers for each of the red, green, and blue channels
const byte red[4] = {
  8, 7, 2, 5};
const byte green[4] = {
  10, 6, 0 , 3};
const byte blue[4] = {
  11, 9, 4, 1};

I can't emphasize this enough, those are not Arduino pins. If you happened to use them that way, then that could definitely be the source of your problems!