Skip to content

Document special upload procedure in UNO R4 WiFi HID tutorial #1246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Document special upload procedure in UNO R4 WiFi HID tutorial
When an UNO R4 WiFi board is running a sketch that uses the HID capabilities, the port address changes during the
upload. Since this change does not occur under other conditions, the platform is not configured to handle such a change.
This causes uploads via the standard procedure to fail under these conditions. Since adjusting the configuration to
allow reliable uploads under any conditions would have harmful side effects, the decision was made to leave the
configuration as it is now.

The upload can be accomplished reliably if the user performs a double reset before uploading, but this fact was not
documented in the tutorial about the board's HID capabilities. The missing documentation is hereby added to the
tutorial.
  • Loading branch information
per1234 committed Aug 4, 2023
commit cf22606ab165b04c1266219c3687a456a5661581
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ To turn your board into an HID, you can use the **keyboard/mouse** API that is b
- [Keyboard](https://www.arduino.cc/reference/en/language/functions/usb/keyboard/)
- [Mouse](https://www.arduino.cc/reference/en/language/functions/usb/mouse/)

## Sketch Upload Interference

As a consequence of the multi-processor design of the UNO R4 WiFi board, uploads may fail with a "`No device found on ...`" error when the board is running a sketch that uses the HID capabilities.

For this reason, you should use the following procedure to upload under these conditions:

**1.** Press and release the button marked "**RESET**" on the board quickly twice. The LED marked "**L**" on the board should now be pulsing.

**2.** Select the port of the board from the menu in Arduino IDE. The port might have changed after the previous step, so make sure to verify that it is selected.

**3.** Upload your sketch as usual.

## Keyboard

To use keyboard functionalities, we need to include the library at the top of our sketch. The Keyboard class contains several methods that are useful to emulate a keyboard.
Expand Down