Go Down

Topic: NESPad - NES Controller Library for Arduino (Read 917 times) previous topic - next topic

bootsector

Jul 18, 2010, 10:44 pm Last Edit: Jul 18, 2010, 10:45 pm by bootsector Reason: 1
Hi folks!

Just bought an Arduino and I'm so glad I did! Bought from SparkFun, the inventor's kit, it allowed me to get introduced to Arduino and basic electronics.

I was able to interface my NES controller with Arduino and control a servo with it. I converted the pad reading code into an Arduino library.

Just uncompress it under libraries folder under you arduion installation folder and use the Arduino IDE to compile and run your code.

Check example code and readme.txt file for further instructions on usage.

Hope you like it!

http://www.mediafire.com/?xfp3xv15zpahasi

Cheers,

bootsector

needle

#1
Oct 12, 2010, 10:36 pm Last Edit: Oct 12, 2010, 10:36 pm by needle Reason: 1
Nice!

but what if i press RIGHT + A... how would i detect it? the code below doesn't work, like i thought it would. any suggestions?

Code: [Select]


if (pad.read()==128 && pad.read()==1){
      ¬†Serial.print("RIGHT + B\n");
      ¬†}





Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy