Make Arduino Uno Work Like Leonardo

60,069

73

40

Introduction: Make Arduino Uno Work Like Leonardo

About: Just another hacker

First of all i want to make this clear it is not like any other turn your uno into a HID only device with one time sketch uploard, you can upload sketches side by side with hid

THAT'S RIGHT! you read what you read no downsides to anything upload sketches like you do on an leonardo without reflashing 16u2 firmware HOW's that for a shock?

SOOOOOOOOOOOOOOOOOO without further talk lets get HIDDING (pun intended).

It also works on arduino mega

Update : Vote for me if you like it. it is in the tech contest and the mcu contest vote for whichever you think it is applicable for or both :D

Step 1: The Tech Talk: Skip If You Dont Care

hello welcome to the tech talk, here i explain everything techy.

SO lets go

The arduino uno the worlds best proto dev board with an ever expanding community but every piece of gold is rough somewhere. That is it dose not have usb HID(human interface device) capability thats where your project dies with a revival potion called the arduino leonardo the leonardo based on a usb capable chip can be used as a usb device a mouse, keyboard whatever but most of us are lazy enough not to buy an arduino leo and search for other ways one of them is to make a arduino leo but that ain't possible for some of us as the chip the leo is based on, is SMD only so no DIP(through hole)package but the uno also uses the chip's little brother the atmega16u2 for programming and that's what we will play with using the DFU mode

So continue to the next step for the knowledge that everyone needs ->

Step 2: The Main Knowledge

This is the general info of what we are going to do

We are going to change the firmware on the usb to serial converter of the uno to work also as a HID simulator

You can still flash chips like normal and also make a usb mouse, keyboard etc.

This your home grown arduino leonardo - no downsides

Continue further to download the stuff you need

Step 3: What You Need

ill keep this short

you need to download the file included it contains the HID library and the hoodloader bootloader

Step 4: The Main Step

Now you start by installing FLIP while your arduino is plugged in

next go into FLIP and select device as atmega16u2

now look closely if you have an arduino uno r3 then do as shown in the picture with the jumper for a second or two with your arduino plugged in for other arduino versions look on google for arduino (version) dfu

Tip : go to device manager and look in com ports before shorting the two pins your arduino should be listed after shorting the pins for a second the arduino should be detected but not listed

now in flip click on the usb cable and and select the option 'usb' (CTRL+U)

it should detect your device and now click on file and load hex file -> locate to the hoodloader folder and select hoodloaderX_X.hex now click on 'run' (not 'start application' it looks promising but is not the option) it should burn the flash on the chip to check unplug the arduino and replug it in device manager you should see hoodloader beta or something similar update the driver for that- select browse my computer for device software and browse to the hoodloader folder it should prompt a security warning(or not)just accept and install

Now go to the final step

Step 5: FINAL Step

now install the HID library you downloaded

to do that you copy the folder HID-master remove the hyphen by renaming it and place it in the arduino/libraries folder now open the arduino ide go to sketchbook > libraries > HID and upload any example its same as the original usb library for the leonardo so you can copy paste some things

here's an example download the .ino file

connect an analog joystick x axis (horizontal) to A1

connect analog joystick y axis(vertixcal) to A2

upload and replug your arduino you should have a hid mouse in device manager

AND for other tech related stuff check out my blog at : techspacey.blogspot.com

Microcontroller Contest

Participated in the
Microcontroller Contest

Tech Contest

Participated in the
Tech Contest

1 Person Made This Project!

Recommendations

  • Furniture Contest

    Furniture Contest
  • Home Decor Challenge

    Home Decor Challenge
  • Toys & Games Contest

    Toys & Games Contest

40 Comments

0
gailenjensen
gailenjensen

Question 2 months ago

Why do I see my Uno in Device Manager but can't open port inside flip? Communication shows Off. When I short the two pins together, it now shows as an unknown device and still can't open the port.

0
322997am
322997am

4 years ago

it says "Keyboard.h" not included when it is

0
InforMatheMusic
InforMatheMusic

Reply 2 years ago

You have to change editor compability mode:change it from UNO to LEONARDO

0
InforMatheMusic
InforMatheMusic

Question 2 years ago

How do i come backi have an AVRDUDE problem and now i don't need HID

0
DR49
DR49

2 years ago

this is great, havent tried it yet, but maybe you could try using punctuation

0
Dimitrios Karampistis

What is this? How can I solve this error? Why does this error pops-up when I am trying to load the .hex file?

Untitled.png
0
Amitash108
Amitash108

Reply 3 years ago

U have to reinstall Flip

0
Eren Kemalİ
Eren Kemalİ

Reply 4 years ago

I got same error too, any solution did u find?

0
Amitash108
Amitash108

Reply 3 years ago

U have to install drivers located in C:\Progtam Files(x86)\Atmel\Flip\usb.. u should do it using device manager manually..

0
Eren Kemalİ
Eren Kemalİ

Reply 4 years ago

Best solution, buy leo/nano. :D

0
as-WIN-th
as-WIN-th

Reply 3 years ago

No nano wont work...

0
Amitash108
Amitash108

Question 3 years ago

I am unable to flash any firmware onto my arduino after flashing the hoodloader.hex file..i end up with error whichever driver I install.

0
banjing
banjing

3 years ago

Hi, did you try to make a virtual mouse using this? Thanks.

0
atharva12
atharva12

Reply 3 years ago

yes, and it worked

0
banjing
banjing

Reply 3 years ago

hi can you share your step by step process? Im using micro. Does it have click option?

0
matt_a_maker
matt_a_maker

4 years ago

I kept getting this error:

AdvancedGamepad:15: error: 'HID_GamepadReport_Data_t' does not name a type

HID_GamepadReport_Data_t Gamepadreport;

^

C:\Users\Matthew\Documents\Arduino\libraries\HIDmaster\examples\AdvancedGamepad\AdvancedGamepad.ino: In function 'void setup()':

AdvancedGamepad:23: error: 'SERIAL_HID_BAUD' was not declared in this scope

Serial.begin(SERIAL_HID_BAUD);

^

AdvancedGamepad:28: error: 'Gamepadreport' was not declared in this scope

memset(&Gamepadreport, 0, sizeof(Gamepadreport));

^

AdvancedGamepad:29: error: 'HID_REPORTID_Gamepad1Report' was not declared in this scope

HID_SendReport(HID_REPORTID_Gamepad1Report, &Gamepadreport, sizeof(Gamepadreport));

^

AdvancedGamepad:29: error: 'HID_SendReport' was not declared in this scope

HID_SendReport(HID_REPORTID_Gamepad1Report, &Gamepadreport, sizeof(Gamepadreport));

^

C:\Users\Matthew\Documents\Arduino\libraries\HIDmaster\examples\AdvancedGamepad\AdvancedGamepad.ino: In function 'void loop()':

AdvancedGamepad:41: error: 'Gamepadreport' was not declared in this scope

Gamepadreport.whole32[0] = count++;

^

AdvancedGamepad:48: error: 'HID_REPORTID_Gamepad1Report' was not declared in this scope

HID_SendReport(HID_REPORTID_Gamepad1Report, &Gamepadreport, sizeof(Gamepadreport));

^

AdvancedGamepad:48: error: 'HID_SendReport' was not declared in this scope

HID_SendReport(HID_REPORTID_Gamepad1Report, &Gamepadreport, sizeof(Gamepadreport));

^

exit status 1
'HID_GamepadReport_Data_t' does not name a type

any ideas?

0
kalariusq
kalariusq

5 years ago

when I try to compile an example it says that look for the platform.h

Where is that?