Skip to content

Commit 8caaaef

Browse files
committed
AE-577: Added more details in comment headers.
1 parent 4065ac8 commit 8caaaef

File tree

4 files changed

+41
-9
lines changed

4 files changed

+41
-9
lines changed

examples/Barcode/Barcode.ino

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
/*
1+
/*
2+
* This example shows how to use the Arduino Portenta C33 USBHIDHost library to read barcodes like the ones printed on common
3+
* products packaging.
4+
*
25
* By connecting a handheld barcode reader to the USB-A port on the mid-carrier board of your Arduino Portenta C33,
36
* you should immediately be able to read standard 13-digit bar codes on any ordinary commercial product packaging.
47
* Please note that barcodes longer than 13 digits will result in the "Invalid character detected, resetting..." being printed.
8+
*
9+
* Instructions:
10+
* 1. Connect your Arduino Portenta C33 to a mid-carrier board;
11+
* 2. Upload this sketch to the Portenta;
12+
* 3. Open the Serial Monitor and chose the same baud rate as used in the sketch;
13+
* 4. Connect your barcode scanner to the USB-A connector on the mid-carrier board and scan away.
514
*/
615

716
#include <Arduino.h>

examples/Keyboard/Keyboard.ino

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
/* This simple example shows how to read keyboard data by both listening for events and polling for available character data in the internal buffers of the USB HID Host */
1+
/*
2+
* This simple example shows how to read keyboard data by both listening for events and polling for available character data in the internal buffers of the USB HID Host
3+
*
4+
* Instructions:
5+
* 1. Connect your Arduino Portenta C33 to a mid-carrier board;
6+
* 2. Upload this sketch to the Portenta;
7+
* 3. Open the Serial Monitor and chose the same baud rate as used in the sketch;
8+
* 4. Connect your keyboard to the USB-A connector and any keypress should be printed to the console window.
9+
*/
210

311
#include <Arduino.h>
412
#include <Arduino_USBHIDHost.h>

examples/KeyboardAndMouse/KeyboardAndMouse.ino

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
/* This simple example demonstrates how to read mouse and keyboard data, by connecting these devices at the same time to the Portenta, via a USB hub */
2-
3-
#include <Arduino.h>
4-
#include <Arduino_USBHIDHost.h>
5-
6-
/*
1+
/*
2+
* This simple example demonstrates how to read mouse and keyboard data, by connecting these devices at the same time to the Portenta, via a USB hub
3+
*
74
* In order to use two (or more) HID devices connected via a USB hub to your Portenta C33 board, please open "tusb_config.h" below (right click -> Go To Definition)
85
* and make sure that "CFG_TUH_HUB" is set to value 1, and that "CFG_TUH_HID" is set to the number of HID devices you intend to connect to your Arduino (2 in this example).
96
* Please also keep in mind that some keyboards and mice which include advanced illumination features might draw more power than the Arduino is able to provide on its
107
* USB-A port and might therefore lead to a reset or failure to be enumerated by the board. Ideally, use basic USB keyboards and mice, these should work best.
8+
*
9+
* Instructions:
10+
* 1. Connect your Arduino Portenta C33 to a mid-carrier board;
11+
* 2. Upload this sketch to the Portenta;
12+
* 3. Open the Serial Monitor and chose the same baud rate as used in the sketch;
13+
* 4. Connect a USB hub to the USB-A connector on the mid-carrier board;
14+
* 5. Now connect your keyboard and mouse to the USB hub and check the printed output on the console when pressing a key on the keyboard or moving the mouse.
1115
*/
1216

17+
#include <Arduino.h>
18+
#include <Arduino_USBHIDHost.h>
1319
#include <tusb_config.h>
1420

1521
// Global device instances

examples/Mouse/Mouse.ino

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
/* This simple example shows how to read mouse data, like cursor position and key states, by registering a callback and listening for events */
1+
/*
2+
* This simple example shows how to read mouse data, like cursor position and key states, by registering a callback and listening for events
3+
*
4+
* Instructions:
5+
* 1. Connect your Arduino Portenta C33 to a mid-carrier board;
6+
* 2. Upload this sketch to the Portenta;
7+
* 3. Open the Serial Monitor and chose the same baud rate as used in the sketch;
8+
* 4. Connect your mouse to the USB-A connector and any movement or keypress should be printed as data to the console.
9+
* Please not that scroll wheel data works inconsistently and might not function correctly with your mouse.
10+
*/
211

312
#include <Arduino.h>
413
#include <Arduino_USBHIDHost.h>

0 commit comments

Comments
 (0)