Im trying to make an N64 controller out of an Arduino Uno so i can interface with the computer using the usb serial port.
Im not that good with programing, and need some help on how i can send the keystrokes.
Im trying to make an N64 controller out of an Arduino Uno so i can interface with the computer using the usb serial port.
Im not that good with programing, and need some help on how i can send the keystrokes.
Heres the Code for reading the Button States.
const int buttonPin2 = 2; // the number of the pushbutton pins
const int buttonPin1 = 1;
const int buttonPin0 = 0;
const int buttonPin3 = 3;
const int buttonPin4 = 4;
const int buttonPin5 = 5;
const int buttonPin6 = 6;
const int buttonPin7 = 7;
const int buttonPin8 = 8;
const int buttonPin9 = 9;
const int buttonPin10 = 10;
const int buttonPin11 = 11;
const int buttonPin12 = 12;
int buttonState1 = 1; // variable for reading the pushbutton status
int buttonState2 = 2;
int buttonState0 = 0;
int buttonState3 = 3;
int buttonState4 = 4;
int buttonState5 = 5;
int buttonState6 = 6;
int buttonState7 = 7;
int buttonState8 = 8;
int buttonState9 = 9;
int buttonState10 = 10;
int buttonState11 = 11;
int buttonState12 = 12;
void setup() {
// initialize the pushbutton pin as an input:
pinMode(buttonPin0, INPUT);
pinMode(buttonPin1, INPUT);
pinMode(buttonPin2, INPUT);
pinMode(buttonPin3, INPUT);
pinMode(buttonPin4, INPUT);
pinMode(buttonPin5, INPUT);
pinMode(buttonPin6, INPUT);
pinMode(buttonPin7, INPUT);
pinMode(buttonPin8, INPUT);
pinMode(buttonPin9, INPUT);
pinMode(buttonPin10, INPUT);
pinMode(buttonPin11, INPUT);
pinMode(buttonPin12, INPUT);
}
void loop(){
// read the state of the pushbuttons value:
buttonState0 = digitalRead(buttonPin0);
buttonState1 = digitalRead(buttonPin1);
buttonState2 = digitalRead(buttonPin2);
buttonState3 = digitalRead(buttonPin3);
buttonState4 = digitalRead(buttonPin4);
buttonState5 = digitalRead(buttonPin5);
buttonState6 = digitalRead(buttonPin6);
buttonState7 = digitalRead(buttonPin7);
buttonState8 = digitalRead(buttonPin8);
buttonState9 = digitalRead(buttonPin9);
buttonState10 = digitalRead(buttonPin10);
buttonState11 = digitalRead(buttonPin11);
buttonState12 = digitalRead(buttonPin12);
}
Nvm i found what i needed here.http://www.aacinstitute.org/Resources/ProductsandServices/AACKeys/AACKeys.html