Multiplexing for my chess robot

Since the diodes are so
Since the diodes are so small you just add them underneath the squares themselves. I’d suggest going to Futurlec if you need to buy them, it’ll only cost US$2.60 for 130 basic diodes =)

well it looks like this is
well it looks like this is what ill have to do. The circuit isnt working too well right now so ill order the diodes form somewhere. The whole circuit is already under the chess board squares. So i now have to flip the whole thing over, crane and all, and add these in to the circuit on the bottom of the chess board.

well i tried this on one
well i tried this on one row. It is a the first row which means there are 7 more rows before the analog reading. I dont know if that may interfere with the last row im reading. I do have it wired up like the schematic above i think. But what is happening is with the resistor, the analog read goes from 0 to about 100 every loop. Each loop of the code it changes from around 0 to around 100. Without the resistor the readings are about 0 without a piece, this is good and not fluctuating. But the problem is a piece makes the whole row that value. This sounds familiar. This is about how isolated they can get so i dont understand.

** you can ignore the pawn**

you can ignore the pawn and bishop part, i had it decerning the pieces but that was before i discovered the problem in the first circuit. The code does print all the inputs. Try to go easy on my code :wink:
int output1 = 52;
int output2 = 53;
int output3 = 50;
int output4 = 51;
int output5 = 22;
int output6 = 23;
int output7 = 24;
int output8 = 25;
int output9 = 26;
int output10 = 27;
int output11 = 28;
int output12 = 29;
int output13 = 30;
int output14 = 31;
int output15 = 32;
int output16 = 33;
int input = 0;
int input1 = 1;
int input2 = 2;
int input3 = 3;
int input4 = 4;
int input5 = 5;
int input6 = 6;
int input7 = 7;
int x1;
int x2;
int x3;
int x4;
int x5;
int x6;
int x7;
int x8;
int x;
void setup(){
pinMode(input1, INPUT);
pinMode(input2, INPUT);
pinMode(input3, INPUT);
pinMode(input4, INPUT);
pinMode(input5, INPUT);
pinMode(input6, INPUT);
pinMode(input7, INPUT);
pinMode(output1, OUTPUT);
pinMode(output2, OUTPUT);
pinMode(output3, OUTPUT);
pinMode(output4, OUTPUT);
pinMode(output4, OUTPUT);
pinMode(output6, OUTPUT);
pinMode(output7, OUTPUT);
pinMode(output8, OUTPUT);
pinMode(output9, OUTPUT);
pinMode(output10, OUTPUT);
pinMode(output11, OUTPUT);
pinMode(output12, OUTPUT);
pinMode(output13, OUTPUT);
pinMode(output14, OUTPUT);
pinMode(output15, OUTPUT);
pinMode(output16, OUTPUT);
pinMode(input, INPUT);
Serial.begin(9600);
}
void loop(){
digitalWrite(output5, HIGH);
digitalWrite(output6, LOW);
x = analogRead(input);
x1 = analogRead(input1);
x2 = analogRead(input2);
x3 = analogRead(input3);
x4 = analogRead(input4);
x5 = analogRead(input5);
x6 = analogRead(input6);
x7 = analogRead(input7);
Serial.println("x");
Serial.println(x);
if(x>=315){
if(x<=340){
Serial.println("white pawn");
}
}
if(x>=200){
if(x<=220){
Serial.println("white bishop");
}
}
Serial.println("--------------------------");
delay(1000);
//---------------------------------------------------------------------------
Serial.println("x1");
Serial.println(x1);
if(x1>=320){
if(x1<=340){
Serial.println("white pawn");
}
}
if(x1>=200){
if(x1<=220){
Serial.println("white bishop");
}
}
Serial.println("--------------------------");
delay(1000);
//--------------------------------------------------------------------------
Serial.println("x2");
Serial.println(x2);
if(x2>=315){
if(x2<=340){
Serial.println("white pawn");
}
}
if(x2>=200){
if(x2<=220){
Serial.println("white bishop");
}
}
Serial.println("--------------------------");
delay(1000);
//-----------------------------------------------------------------------------
Serial.println("x3");
Serial.println(x3);
if(x3>=315){
if(x3<=340){
Serial.println("white pawn");
}
}
if(x3>=200){
if(x3<=220){
Serial.println("white bishop");
}
}
Serial.println("--------------------------");
delay(1000);
//--------------------------------------------------------------------------------
Serial.println("x4");
Serial.println(x4);
if(x4>=315){
if(x4<=340){
Serial.println("white pawn");
}
}
if(x4>=200){
if(x4<=220){
Serial.println("white bishop");
}
}
Serial.println("--------------------------");
delay(1000);
//-----------------------------------------------------------------------------------
Serial.println("x5");
Serial.println(x5);
if(x5>=315){
if(x5<=340){
Serial.println("white pawn");
}
}
if(x5>=200){
if(x5<=220){
Serial.println("white bishop");
}
}
Serial.println("--------------------------");
delay(1000);
//-----------------------------------------------------------------------------------------
Serial.println("x6");
Serial.println(x6);
if(x6>=315){
if(x6<=340){
Serial.println("white pawn");
}
}
if(x6>=200){
if(x6<=220){
Serial.println("white bishop");
}
}
Serial.println("--------------------------");
delay(1000);
//-------------------------------------------------------------------------------------------
Serial.println("x7");
Serial.println(x7);
if(x7>=315){
if(x7<=340){
Serial.println("white pawn");
}
}
if(x7>=200){
if(x7<=220){
Serial.println("white bishop");
}
}
Serial.println("--------------------------");
delay(1000);
}