Send Command to Arduino UNO as HID

Hi,

Is there a way to a send command or software input to arduino uno acting as an HID. I know that arduino uno isn't the best board to use this, but due to the lockdown on the area, i have no way to buy arduino leonardo or other board. I only have arduino uno and Mega at my disposal.

My project is to use a C# software to send input (signal to send keyboard strokes) to arduino.
I've already manage to make Uno as HID keyboard and send strokes via hard coded instructions, but once i configured the arduino as HID i could no longer contact or send inputs to it. Maybe there is other way.

Thanks in advace.

Then you had better start by explaining exactly what you have done to the UNO. :astonished:

i change the bootloader using atmel flip to act as HID, and when im uploading program i revert it back to its original bootloader.

If you have an additional USB-to-TTL converter (this can be another Arduino with the reset pin permanently connected to GND), you can hook it up to a software serial on the Uno and use that for serial communication.

sterretje:
If you have an additional USB-to-TTL converter (this can be another Arduino with the reset pin permanently connected to GND), you can hook it up to a software serial on the Uno and use that for serial communication.

Hello, thank you for this idea!

i have other arduino which is arduino mega 2560,, from my understanding i will connect the gnd and rst of mega. then connect its TX RX to arduino UNO software serial e.g. pin 2 3? the mega will be connected to PC and it will power the UNO? or i need 2 usb type A connector?

yuri123:
i change the bootloader using atmel flip to act as HID, and when im uploading program i revert it back to its original bootloader.

Thought as much. I have no experience with the HID emulation on the 16U2 but I would have thought it would be two-way as for example, you need to be able to control the three "Lock" indicators.

Surely it would be in the documentation?

Connect both Uno and Mega to PC; that will power them.

Connect RX and TX; GND not strictly necessary as that goes through PC. But you need to keep the 2560 in reset.

thank you. your a life saver. was finally able to solve my problems and continue coding.