You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use an Arduino Uno R3 with Hooloader2 (2.0.5) which I want to use as a gamepad.
I compiled the Gamepad.ino sketch, uploaded it to "Hoodloader2 16u2" board in the arduino IDE, got the gamepad
appearing in the Windows device, no problem until that.
But it seems that the board/gamepad is not responding to digital input, I tried putting a switch
on D2 wired to GND but nothing happen when I press the switch.
I tested the code below when the board is in "Hoodloader2 uno" and digitalread() returns the state
of the switch well, I conclude the D2 pin is not damaged and is functionning.
void setup() {
//the setup routine runs once when you press reset
for (int i = 2; i <= 12; i++){
pinMode(i, INPUT);
digitalWrite(i, HIGH);
}
Serial.begin(9600); //initialize serial communication at 9600 bits per second
}
void loop() {
//the loop routine runs over and over again forever
int btn_max=!digitalRead(2);
Serial.println(btn_max);
delay(200); //delay in between reads for stability
}
I decided to test this code when the board is in "Hoodloader2 16u2" mode, and digitalRead() always returns the
same value even if the switch is pressed. And that is the cause of the gamepad.ino example sketch not working, even
if the gamepad is detected and appears in the windows device control panel.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everybody,
I use an Arduino Uno R3 with Hooloader2 (2.0.5) which I want to use as a gamepad.
I compiled the Gamepad.ino sketch, uploaded it to "Hoodloader2 16u2" board in the arduino IDE, got the gamepad
appearing in the Windows device, no problem until that.
But it seems that the board/gamepad is not responding to digital input, I tried putting a switch
on D2 wired to GND but nothing happen when I press the switch.
I tested the code below when the board is in "Hoodloader2 uno" and digitalread() returns the state
of the switch well, I conclude the D2 pin is not damaged and is functionning.
I decided to test this code when the board is in "Hoodloader2 16u2" mode, and digitalRead() always returns the
same value even if the switch is pressed. And that is the cause of the gamepad.ino example sketch not working, even
if the gamepad is detected and appears in the windows device control panel.
Can anyone help ? thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions