Oh wait, I just got it, I had to add it here:
// Clock Cycles 2-16
for (int i = 1; i <= 15; i++)
{
digitalWrite(clock1,HIGH);
delayMicroseconds(4);
digitalWrite(clock1,LOW);
delayMicroseconds(4);
controllerData1[i] = digitalRead(data1);
for (int i = 1; i <= 15; i++)
{
digitalWrite(clock2,HIGH);
delayMicroseconds(4);
digitalWrite(clock2,LOW);
delayMicroseconds(4);
controllerData2[i] = digitalRead(data2);
}
}
}
// NES Button Reference
// 01111111 - A [0]
// 10111111 - B [1]
// 11011111 - SELECT [2]
// 11101111 - START [3]
// 11110111 - UP [4]
// 11111011 - DOWN [5]
// 11111101 - LEFT [6]
// 11111110 - RIGHT [7]
// UP+RIGHT
// UP+LEFT
// DOWN+RIGHT
// DOWN+LEFT
/* MAIN LOOP */
void loop()
{
controllerRead();
String Out = "";
int length = 1;
That will get a second controller plugged in to the arduino thanks to you guys. I will start expirmenting with that to make that work properly. But I am still stuck with the limitation of only having 16 keystrokes to work with. Any ideas? Thanks guys, you all are awesome.