ArduRemote - Virtual keyboard and mouse


This is a virtual mouse and keyboard for your Arduboy. Days ago I needed a mouse (for some reason in Acronis Trueimage you cannot use the touchpad of the MS Surface Pro 4) and I did not have any physical mouse laying around so this could be handy on those emergencies.

Hex file:


PS: If you are wondering: this sketch did not killed my first Arduboy. I ordered a second one and it has been working perfectly, so if you have problems just hold the UP key when uploading something new (it seems that having the serial+HID makes the Arduboy stubborn to receive uploads if you do not hold that key but that is a known workaround)


The real reason why you can’t upload a new sketch after having installed your app is:

You turn your device into HID, which means the USB is set as an output device (seen from the Arduboy’s viewpoint).
When you want upload code, USB needs to be input (seen from the Arduboy’s viewpoint).

EDIT: See post by @MLXXXp below

SO the good solution would be to add this into your code, meaning an option to quit the HID interface and return USB back to input. (call it an “exit” button)

PS: using the UP key will prevent you sketch from running, and from turning the USB into HID. But might not work on all devices, so providing the “exit” button would be a very nice gesture towards your users.

That is a good idea, but pressing UP is not that big of a deal after all, plus this is mainly an “emergency” program for me :smiley: just in case I needed a mouse/keyboard.

I wrote that “disclaimer” because my first Arduboy is dead for a different reason (there is no USB descriptor at all when using the flashlight) so I just wanted to be clear that this current Sketch is totally safe as it should be :slight_smile:

Technically, both HID and the serial mode used for upload are a client interface (seen from the Arduboy’s viewpoint). The terms input and output are not relevant in this context.

However, emulating a mouse and/or keyboard can interfere with uploads, as has been experienced with this sketch. The Arduino Mouse and Keyboard library documentation cautions about this.

1 Like

Lol wow this is such a great implementation of the HID profile. Amazing, I can’t believe it fits on the screen. Points :100: