Thanks for all of your help I got it to work.
This is my finished code
const int pinBtnUp = 0;
const int pinBtnDown= 1;
const int pinLEDOutput = 11;
boolean boolBtnUp;
boolean boolBtnDown;
void setup()
{
//Setup the pin modes.
pinMode( pinLEDOutput, OUTPUT );
pinMode( pinBtnUp, INPUT_PULLUP );
pinMode( pinBtnDown, INPUT_PULLUP );
//Zero the SNES controller button keys:
boolBtnUp = false;
boolBtnDown = false;
}
void loop()
{
// //debugging the start button...
digitalWrite ( pinLEDOutput, digitalRead(pinBtnUp));
fcnProcessButtons();
}
void fcnProcessButtons()
{
boolean boolBtnUp = !digitalRead(pinBtnUp);
boolean boolBtnDown = !digitalRead(pinBtnDown);
if ( boolBtnUp )
{
//Set key1 to the U key
Keyboard.set_key1( KEY_U );
} else {
Keyboard.set_key1( 0 );
}
if ( boolBtnDown )
{
//Set key1 to the U key
Keyboard.set_key2( KEY_D );
} else {
Keyboard.set_key2( 0 );
}
//Send all of the set keys.
Keyboard.send_now();
}
