system
February 1, 2013, 9:55am
13
Four minutes to a bump post?
"look up serial.write" doesnt tell me anything.
How am I supposed to know that?
i think as a moderator you could help?
I saved you the embarrassment of having your cross-posting reported as a violation of forum rules, didn't I?
system
February 1, 2013, 9:56am
14
AWOL:
Four minutes to a bump post?
"look up serial.write" doesnt tell me anything.
How am I supposed to know that?
i think as a moderator you could help?
I saved you the embarrassment of having your cross-posting reported as a violation of forum rules, didn't I?
... talk about policing, is this where i come to get help? or is it a place for forum moderators to do their job?
system
February 1, 2013, 9:58am
15
I'm a janitor, not a policeman.
I clean up after untidy posters.
system
February 1, 2013, 10:02am
16
AWOL:
I'm a janitor, not a policeman.
I clean up after untidy posters.
my post was tidy, till you guys messed it up, and how about you answer my problem so you can stop "cleaning up" the post. instead of wasting time telling me that my post is messy, invest the time into helping someone? get on my level
system
February 1, 2013, 10:05am
17
{SIGH}
Serial.print(output, BYTE);
Serial.write (output);
system
February 1, 2013, 10:10am
18
AWOL:
{SIGH}
Serial.print(output, BYTE);
Serial.write (output);
cmon im not that stupid. i already tried that.
system
February 1, 2013, 10:16am
20
Quite.
Here's the error message I got with that one change:
Binary sketch size: 2508 bytes (of a 14336 byte maximum)
Over to you.
system
February 1, 2013, 10:20am
21
AWOL:
Quite.
Here's the error message I got with that one change:
Binary sketch size: 2508 bytes (of a 14336 byte maximum)
Over to you.
well when you process it, nothing, i got no errors with processing... so...
system
February 1, 2013, 10:22am
22
well when you process it, nothing,
I have no idea what that means.
system
February 1, 2013, 10:27am
24
well night, ive been trying to solve this for 8+ hours now. its 3am, bye
system
February 1, 2013, 10:28am
25
I've already got Processing, thank you, what I don't have is a NES controller.
Have you tried serial debugging your Arduino?
const int latch = 2;
const int clock = 3;
const int data = 4;
#define latchlow digitalWrite(latch, LOW)
#define latchhigh digitalWrite(latch, HIGH)
#define clocklow digitalWrite(clock, LOW)
#define clockhigh digitalWrite(clock, HIGH)
#define dataread digitalRead(data)
#define wait delayMicroseconds(200)
byte output;
void setup()
{
Serial.begin(9600);
pinMode(latch, OUTPUT);
pinMode(clock, OUTPUT);
pinMode(data, INPUT);
}
void loop()
{
output = 0;
ReadNESjoy();
// Serial.write(output);
Serial.println ((unsigned int)output);
}
void ReadNESjoy()
{
latchlow;
clocklow;
latchhigh;
wait;
latchlow;
for (int i = 0; i < 8; i++) {
clockhigh;
wait;
output += dataread * (1 << i);
clocklow;
wait;
}
}
See what you get in the serial monitor.
system
February 1, 2013, 8:29pm
26
AWOL:
I've already got Processing, thank you, what I don't have is a NES controller.
Have you tried serial debugging your Arduino?
See what you get in the serial monitor.
i dont know how to debug, and when i serial monitor, i get a bunch of "0"
Craftee:
so i have this old peice of code here, and i get an error saying "The 'BYTE' keyword is no longer supported" so what do i use instead? please help!
This is a really confusing thread. I got the impression until the last post or so that you hadn't solved the above problem, after all the begging for help.
Instead, you have solved it and replaced it with another one (the sketch compiles but doesn't do what you expect).
You could have made that a lot clearer, instead of:
well when you process it, nothing, i got no errors with processing... so...
C'mon on, we can't read minds.
Craftee:
i dont know how to debug, and when i serial monitor, i get a bunch of "0"
Copy and paste what you get in the serial monitor.
system
February 1, 2013, 8:34pm
29
Copy and paste what you get in the serial monitor.
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
and it spams it, nonstop
system
February 1, 2013, 8:35pm
30
So, what does that tell you?
How have you wired it up? A very clear photo would help answer that.
What happens if you press buttons on the controller, or move things? Getting zero seems to say to me nothing is pressed.