NicoHood / HoodLoader2

16u2 Bootloader to reprogram 16u2 + 328/2560 with Arduino IDE
http://www.nicohood.de
734 stars 186 forks source link

Help with Arduino Uno with HoodLoader2 (pin issue?) #82

Closed stevealexandre closed 3 years ago

stevealexandre commented 3 years ago

Hi everyone,

I have flash my uno with hoodloader2 but trying to use the keyboard still not working. When I'm pressing the button, the text is not print and nothing happen.

void setup() { // make pin 2 an input and turn on the // pullup resistor so it goes high unless // connected to ground: pinMode(2, INPUT_PULLUP); Keyboard.begin(); }

void loop() { //if the button is pressed if (digitalRead(2) == LOW) { //Send the message Keyboard.print("Hello!"); } }



- Here the target circuit :
![circuit](https://user-images.githubusercontent.com/21204359/109986556-28a35280-7d06-11eb-8002-6576952c453b.PNG)

- As you can see on Windows, it's reconized as HoodLoader2 :
![image](https://user-images.githubusercontent.com/21204359/109986834-656f4980-7d06-11eb-8751-cf6b6e715522.png)

I'm beginner on arduino but my build for me seems ok.
The final objectif for me is to have an hand push to talk button :).
On the HID github, he told me i'm using the wrong pins for the wrong mcu but I have tried many pins and same result.

Thanks.
NicoHood commented 3 years ago

It does not help if you open the issue again. You need to use the 4 pin header of the 16u2, not the "normal" arduino pins. https://github.com/NicoHood/HoodLoader2/wiki/Arduino-Uno-Mega-16u2-Pinout

You must understand, that you are controlling 2 MCUs now, not a single one.