-
-
Notifications
You must be signed in to change notification settings - Fork 67
How to use on Arduino Uno and Arduino Mega
Arduino Uno and Arduino Mega are based on an ATmega328 and ATmega16U2, yes two microcontroller on one board. The ATmega328 does not handle the USB communication on the Arduino boards, the ATmega16U2 handle the communication. The sketch you upload, is uploaded to the ATmega328, so you can't change what the ATmega16U2 is doing. But that is important for this library. This library needs control over the USB communication in such a way that:
- VID and PID can be changed
- new USB Endpoint can be defined
- HID Reports can be send and received Nothing of that can be done with the normal Arduino Uno and Mega, because you can not program the ATmega16U2.
To change this HoodLoader2 must be used. HoodLoader2 is a bootloader to reprogram the ATmega16U2.
If anything goes wrong while burning the HoodLoader2 bootloader you can 'brick' your Arduino. It's up to you to decide what to do with your Arduino.
- follow the instructions carefully to install HoodLoader2
- read how to use reset with HoodLoader2
- read how to upload sketches using HoodLoader2
- open
example/HoodLoader2UnoMegaController/HoodLoader2UnoMegaController.inoin Visual Studio - select
HoodLoader2 Uno/HoodLoader2 Mega 2560in boards menu - hit upload to upload
HoodLoader2UnoMegaController.inoto the IO MCU - open
example/HoodLoader2CLPBridge/HoodLoader2CLPBridge.inoin Visual Studio - select
HoodLoader2 16u2in boards menu - hit upload to upload
HoodLoader2CLPBridge.inoto the 16u2
Short the reset pin twice to enter bootloader mode manually as described here. Then retry uploading with the new COM port.