Make Arduino Uno Work Like Leonardo

45,810

69

34

Published

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

Share

Recommendations

  • Casting Contest

    Casting Contest
  • Make it Move Contest

    Make it Move Contest
  • Clocks Contest

    Clocks Contest
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

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.

34 Comments

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
6 replies

U have to reinstall Flip

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

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

No nano wont work...

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

2 replies

yes, and it worked

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

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

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?

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

Where is that?

1 reply

See the last post on this thread:
http://forum.arduino.cc/index.php?topic=302238.0

hi tanks for project .

when I follow your instruction I got this error in the image.

1.png
1 reply

Hey, you have to disable Windows' check for digital signatures. This can be done on windows 8/10 by holding shift while clicking restart and then going to option 7 under startup options

I did everything and it doesn't work

Thanks for the guide, one question if any one knows if Hoodloader allows reading of a serial COM port and output as a HID keyboard, the Leonardo can do it but can a Uno with Hoodloader do it?

1 reply

I don't know about the COM port readout but yes this HID keyboard is possible by modifying the leo code itself to support the hoodloader software