This is kinda just random complaining about arduino micro as HID keyboard

I’m trying to use an arduino micro as a HID because it has native USB so it’s capable of that.
They are SO irritating.
First off, the 3.3V versions run at 8mhz and if you’re not careful you can easily render one unusable without a dedicated hardware programmer, because it’ll happily accept the settings for an Arduino Micro, which are secretly for a 16mhz unit, and then it can’t function as a usb device anymore.
Secondly, because of how the native USB works, about half the time when I upload code it decides the port is busy, as the chip hasn’t released the port, so I have to go sudo minicom and disconnect that way, and then it’ll talk again.
And once I battled through both of those the avr apparently decided to escalate and do something that turned off all the usb ports on my laptop requiring a reboot.
Sheesh.
All this to try to make a custom chorded keyboard, and, maybe it’s time to just abandon that idea, or use a different controller.

1 Like

Maybe a teensy?

Yeah. I was trying to do this with stuff I had on hand, but, what a pain.

1 Like

I think I have seen somewhere that the very new versions of the ESP32 are HID devices as well. Maybe ESP32-S3? I don’t remember the name.

1 Like

I initially disliked the 32u4 arduinos because they were less bombproof than the type with a separate USB / serial converter and needed more of the system working to get debug output.

But I’ve got used to them, and use both 3v3 and 5V versions.

The current version of the Arduino IDE deals better with the vanishing serial device. You can often leave the serial monitor open while reprogramming or even replugging, and it will return to being connected. This feature first appeared in pjrc’s teensy support and now seems to have reached the mainstream.

I haven’t lost any to accidental programming with the wrong code. I don’t think it will overwrite the boot loader - it’s just the application, so it can’t respond to the normal poke that puts it into programming mode.

This is awkward to get out of - you need to stop it getting into application mode. I used to do this by sending a simple sketch (eg blink) and resetting while it tried to communicate - an avrdude retry would often catch it at the bootloader stage.

But there’s a really useful feature that makes this easier to do. If you reset the device (possibly by bridging RST and GND pins, as there’s no button on these boards) twice within a second or so, it will NOT load the app but stay in the bootloader instead. This make it easy to reprogram correctly.

3 Likes