Offline
Jr. Member
Karma: 0
Posts: 67
|
 |
« Reply #15 on: February 01, 2013, 05:02:24 am » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Online
Brattain Member
Karma: 136
Posts: 18995
I don't think you connected the grounds, Dave.
|
 |
« Reply #16 on: February 01, 2013, 05:05:31 am » |
{SIGH} Serial.print(output, BYTE); Serial.write (output);
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 67
|
 |
« Reply #17 on: February 01, 2013, 05:10:07 am » |
{SIGH} Serial.print(output, BYTE); Serial.write (output); cmon im not that stupid. i already tried that.
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Faraday Member
Karma: 15
Posts: 2852
Gorm deficient
|
 |
« Reply #18 on: February 01, 2013, 05:12:29 am » |
cmon im not that stupid. i already tried that. Must...resist...
|
|
|
|
|
Logged
|
Per Arduino ad Astra
|
|
|
|
Global Moderator
UK
Online
Brattain Member
Karma: 136
Posts: 18995
I don't think you connected the grounds, Dave.
|
 |
« Reply #19 on: February 01, 2013, 05:16:33 am » |
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.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 67
|
 |
« Reply #20 on: February 01, 2013, 05:20:16 am » |
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...
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Online
Brattain Member
Karma: 136
Posts: 18995
I don't think you connected the grounds, Dave.
|
 |
« Reply #21 on: February 01, 2013, 05:22:14 am » |
well when you process it, nothing, I have no idea what that means.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 67
|
 |
« Reply #22 on: February 01, 2013, 05:23:26 am » |
well when you process it, nothing, I have no idea what that means. http://processing.org/download/
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 67
|
 |
« Reply #23 on: February 01, 2013, 05:27:00 am » |
well night, ive been trying to solve this for 8+ hours now. its 3am, bye
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Online
Brattain Member
Karma: 136
Posts: 18995
I don't think you connected the grounds, Dave.
|
 |
« Reply #24 on: February 01, 2013, 05:28:12 am » |
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.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 67
|
 |
« Reply #25 on: February 01, 2013, 03:29:18 pm » |
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"
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #26 on: February 01, 2013, 03:29:54 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #27 on: February 01, 2013, 03:30:17 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 67
|
 |
« Reply #28 on: February 01, 2013, 03:34:28 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Online
Brattain Member
Karma: 136
Posts: 18995
I don't think you connected the grounds, Dave.
|
 |
« Reply #29 on: February 01, 2013, 03:35:41 pm » |
So, what does that tell you?
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
|