Update Urdiono Boread Firmware in IDE

Hello,

I'm trying to use my UNO as a keyboard, I know I must update the firmware so it can be sued as an HID.
Lets assume I've updated the firmware of my arduino Uno using dfu programer, thus I should be able to compile and upload my keyboard sketch, howevr the Uno board in the Arduino IDE (1.8.19) doesn't know Ive did the update therefor it wont compile the sketch, when i change the board to Leonardo, it compiles successfully.

What should change so the board in arduino IDE so it would compile the sketch?

Because the Leonardo, the Micro and the PJRC Teensy 2.0, and 2.0+ all have USB-AVR chips that let you switch modes on the fly.

But the instructions from arduino say all I have to du is to update the firmware

Please provide a link to those instructions.

Please provide the details (e.g. a link). This sounds like you have (or plan to) update the 16U2 TTL-to-USB converter. If so, it's my understanding that you still need to use serial print/write statements; the only thing that changes is the way it is translated and send to the PC. You will not be able to use the Keyboard.h or Mouse.h libraries.

And cut at least one trace. That's where I lost interest 10 years ago.
No, the Uno hasn't changed since.

I don't think they do.

In order to do this you must first load the code you want to use. Then update the firmware.
If you want to do any change to that software you then have to do the restoration of the original firmware before you can upload any new software. It it a PITA to do this especially if you are not a very good programmer and need a lot of goes before you get it right.

Note this only works with the UNO rev 3, older Arduino UNOs have another type of USB to serial chip in them and will not work. This also applies to many clones claiming to be a UNO.

Much simpler to just get the right processor to begin with.

The whole thing started a week ago when i found a PS2 keyboard that i want to use, after some research, i found a sketch (which I'm trying to compile) that will convert the PS2 signal into USB. The only arduino board I have is the Uno, the IDE failed to compile it, after further research I found out the Uno can't be used as a HID unless I update the firmware of the 8U2 and that a whole different issue mainly because I'm on a mac, unfortunately I wasted many days on this, I should've let it go after the second hour -at least I've learned how to use avrdude!

My question is, why does the Arduino IDE won't compile the code if it's error free?

The HID library for the ATmega32u4 (Arduino Micro, Arduino Leonardo, others) references internal peripherals that are just not present on the Uno.
You can get SOME USB functionality by changing the firmware on the ATmega16u2 chip, but it's of necessity DIFFERENT than the functionality provided by the 32u4, and would require a different sketch.

how to connect PS2 keyboard to Arduino direct

The compilation is conditional based on the processor. For the 328P, the condition is not satisfied and you get errors that e.g. Keyboard could not be found.

By the way, you haven't answered the questions in post #4.

Thank you all for your answers, now I understand why it’s not compiling and have a better understanding of the 16U.

I’ll attempt again reflashing the firmware and write a custom sketch that doesn’t use the keyboard library.

Similar to this Tutorial: How to Use Arduino Uno as HID | Part 1: Arduino Keyboard Emulation ~ TechToTinker

If necessary I’ll start a new thread about the hardware

$16 ATmega32U, 2.5K RAM, 12 analog inputs, small enough to be made into an adapter cable.

If you have an Uno, you can bootload and program other Arduinos including breadboard to PCB AVR-chip-duinos. Do you have even 1 spare bootloaded chip for the Uno?

I managed to get it working, partially, by flashing a firmware to the atmega8u2 chip that make the computer recognize the uno as a usb keyboard, all I have to do now is write a program to translate all the keys of the ps2 keyboard.
It’s kinda trippy to see the os recognize the uno as a kb, it’s like a makeshift rubber ducky.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.