0

I have an arduino uno rev 3 and it works perfectly fine. I the OS I am using is Kali Linux 2.0 and you can upload everything as normal to the arduino. I am following this tutorial:Arduino Uno as usb HID interface device to use my arduino uno r3 as a hid device. After I upload the

Arduino-keyboard-0.3.hex

file, I plug cycle the board and I try uploading the example blink program. It always says:

Serial Port /dev/ttyACM0 not found.
Retry the upload with another serial port?
/dev/ttyS0

the /dev/ttyACM0 is my default arduino port and /dev/ttyS0 is one of my usb devices that is plugged in. Neverless, I tried uploading but it says board isnt responding. Can someone help me with this please?

1 Answer 1

2

You have reprogrammed the ATMega16U2 chip to be a HID device. Thus it no longer functions as a serial interface between the Atmega328P and your computer. You need to reflash the firmware on the ATMega16U2 to return to normal operation.

I have instructions for how you might to this on my bootloader uploader page. In brief, you need to put the original hex file back:

sudo dfu-programmer atmega16u2 flash Arduino-atmega16u2-Uno-firmware-Rev3.hex

There are other ways of turning your Uno into a HID device. Search for "Virtual USB Arduino".

More easily, get a Arduino Leonardo or Arduino Micro which are designed for this sort of thing.


Yes but how can I use it as a HID? ... it cannot detect it so how would I be able to upload code to it ...

What is "it" here? Look at this photo:

Uno from above

There are two processors on the Uno. It sounds like you have reflashed the ATMega16U2. Do you want to use the ATMega16U2 as a HID or the Atmega328P as a HID? They need totally different techniques.

Once you reflash the ATMega16U2 you can't "get to" the Atmega328P via the USB interface.

On the page you linked there is a workflow for programming the ATMega16U2. Are you following it? If so, which part is not working for you? If not, why not?

2
  • Yes but how can i use it as a HID? I cant seem to be able to use the Arduino IDE as it cannot detect it so how would I be able to upload code to it as they did in the tutorial?
    – malteasy
    Commented Mar 14, 2016 at 0:51
  • See amended reply.
    – Nick Gammon
    Commented Mar 14, 2016 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.