Roxas240 / nespad

Automatically exported from code.google.com/p/nespad
0 stars 0 forks source link

Serial Monitor Showing no Change when Pressing Buttons #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Upload NESpad serial example on Arduino board.
2. Plug in wires as shown between the pinout graphic and the documentation (NES 
strobe = 
Arduino pin 2, NES clock = Arduino pin 3, NES data = Arduino pin 4, NES +5V = 
Arduino +5V 
pin, NES GND = Arduino GND pin).
3. Run program with NES controller connected.
4. Open serial monitor.
5. Press buttons on NES joypad.

What is the expected output? What do you see instead?

I expect to see the bytes sent by the chip in the NES joypad, but instead, all 
I see is:

11111111111111111111111111111111

repeating line-by-line, once each second.

What version of the product are you using? On what operating system?

I am using an Arduino Duemilanove with an Atmega 328, connected to an original 
NES controller.  
The Arduino IDE is operating on a late-2008 MacBook Pro with a 2.4 GHz Intel 
Core 2 Duo, 2 GB 
RAM, running OS X version 10.5.8.

I have not encountered any similar problems using my Arduino with other 
projects interacting 
with this exact same setup.

Please provide any additional information below.

I posted this previously, but I found that my baud rate was set incorrectly in 
the serial monitor.  
Upon setting the serial monitor baud rate to 57600 as stated in the code, the 
output changed, 
but the condition did not.  I still receive no button press data of any kind 
from my NES joypad.  
The joypad I am using was just unplugged from a working NES console, and was 
working before 
I tried to use it with my Arduino.

The code found at 
http://little-scale.blogspot.com/2007/07/nes-controller-to-arduino.html 
works just fine, though.  Just thought you should know.

Original issue reported on code.google.com by adrian.t...@gmail.com on 5 Nov 2009 at 2:47

GoogleCodeExporter commented 8 years ago
Ok I know I'm a bit late but just in case ...

Try to change pinout scheme... let's say : DATA 5, STROBE 7, CLOCK 6 and 
declare your SNESPad (or NESPad) object with " SNESpad nintendo = 
SNESpad(7,6,5); ". Don't forget to check your baud rate. Hope it would work for 
you ;)

Thanks for your cool library ;)

Original comment by cyril.br...@gmail.com on 29 Jun 2010 at 11:54

GoogleCodeExporter commented 8 years ago
This library did not work for me at all until I fixed the code.  Did anyone get 
this working with an SNES controller?  The problem is that the constructor 
arguments strobe, clock, and data are NOT successfully assigned to m_strobe, 
m_clock, and m_data outside of the constructor.  So all the digitalWrites and 
the digitalRead are on pin 0.  There's no way this could have worked for 
anyone, unless the avr-gcc compiler just broke recently.

Original comment by nootropi...@gmail.com on 13 Jul 2010 at 2:45

GoogleCodeExporter commented 8 years ago
Default constructor appears to be broken. 

Explicitly declaring an object ( SNESpad nintendo = SNESpad(2,3,4); ) works 
fine. 

Original comment by jssheffi...@gmail.com on 15 Aug 2010 at 5:23

GoogleCodeExporter commented 8 years ago
I wrote this quite a while ago and I'm pretty sure it worked then without 
specifying the pin numbers in the constructor.  I'd be surprised if something 
changed in avr-gcc to break it, but who knows.  Since I don't even have a game 
pad to test this with anymore, I think the easiest thing to do is just say that 
you always have to specify the pin numbers - not a big deal, right?

Original comment by rah...@gmail.com on 8 Nov 2010 at 6:00

GoogleCodeExporter commented 8 years ago
I've uploaded a version 1.3 that gets rid of the constructor with default pin 
assignments.

Original comment by rah...@gmail.com on 13 Nov 2010 at 2:54