HI! I'm new here and new to arduino and circuits overall. My first project is to interface the arduino with a gamecube controller.
I have found gamecube pinouts on google and have striped the gamecube controller wires. Then I soldered them to jumpers so I can connect everything easier. My current problem is that the arduino returns only 0's.
Current Pinout:
Yellow 5V power supply (used by rumble motor).
Red DATA line: bi-directional data to/from console, pull-up to 3.43V
Green & White Ground.
Blue 1 3.3V logic supply
The red cable is connected to the digital pin 2 on the arduino.
This is my current code:
const int dataPin = 2;
void setup() {
// put your setup code here, to run once:
pinMode(dataPin, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int sensorValue = digitalRead(dataPin);
Serial.println(sensorValue);
}
As I said, I only see 0's in the serial monitor. Any help is appreciated. Thank you!
Yellow 5V power supply (used by rumble motor).
Red DATA line: bi-directional data to/from console, pull-up to 3.43V
Green & White Ground.
Blue 1 3.3V logic supply
You maybe get only 0 if you havent pull-up resistor to keep dataline high state.
Connect resistor between red and blue wire. value for resistor can be 10 kohm or something like that.
You maybe get only 0 if you havent pull-up resistor to keep dataline high state.
Connect resistor between red and blue wire. value for resistor can be 10 kohm or something like that.
[/quote]
What I just tried was red(Data) to bread board row 1.
blue(3.3v) to bread board row 2.
Then jumperA on row 1 to pin 2. So Red>bread board>pin2
Then resistor from row 1 to row 2. So the resistor is linking data row with 3.3v from controller.
Ok glad it's correct. My program still shows only 0's though. Someone had said that I needed to slow down the input. If this is correct would anyone show me how?