From 02ecd752251f205253b593cfc753e499d99b8d4e Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 4 Aug 2023 03:32:35 -0700 Subject: [PATCH 1/2] Remove superfluous anticipatory sentence re: UNO R4 WiFi HID examples The sentence doesn't offer anything of value and creates an unnecessary dependence between the section that contains it and those that follow, making it difficult to add new content. --- .../02.hero/boards/uno-r4-wifi/tutorials/usb-hid/usb-hid.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/content/hardware/02.hero/boards/uno-r4-wifi/tutorials/usb-hid/usb-hid.md b/content/hardware/02.hero/boards/uno-r4-wifi/tutorials/usb-hid/usb-hid.md index e6d647c096..1d5e0c177e 100644 --- a/content/hardware/02.hero/boards/uno-r4-wifi/tutorials/usb-hid/usb-hid.md +++ b/content/hardware/02.hero/boards/uno-r4-wifi/tutorials/usb-hid/usb-hid.md @@ -36,8 +36,6 @@ 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/) -In the section below, you will a couple of useful examples to get you started! - ## 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. From cf22606ab165b04c1266219c3687a456a5661581 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 4 Aug 2023 04:36:11 -0700 Subject: [PATCH 2/2] 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. --- .../boards/uno-r4-wifi/tutorials/usb-hid/usb-hid.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/content/hardware/02.hero/boards/uno-r4-wifi/tutorials/usb-hid/usb-hid.md b/content/hardware/02.hero/boards/uno-r4-wifi/tutorials/usb-hid/usb-hid.md index 1d5e0c177e..437004432d 100644 --- a/content/hardware/02.hero/boards/uno-r4-wifi/tutorials/usb-hid/usb-hid.md +++ b/content/hardware/02.hero/boards/uno-r4-wifi/tutorials/usb-hid/usb-hid.md @@ -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.