You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/giga-usb.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ The GIGA R1 has two USB connectors:
44
44
45
45
***Note: do NOT connect the USB-A connector to your computer. This is not a programming port and if the `PA15` pin is enabled, it can damage your computer's USB port.***
46
46
47
-
Below is an example of how you should use the USB-C / USB-A connectors.
47
+
Below is an example of how you should use the USB-C / USB-A connectors.
48
48
49
49

50
50
@@ -158,7 +158,7 @@ void setup() {
158
158
;
159
159
}
160
160
Serial.print("read done ");
161
-
161
+
162
162
//function to write to file
163
163
WriteToFile();
164
164
}
@@ -182,9 +182,9 @@ void WriteToFile() {
182
182
Serial.print(count);
183
183
Serial.print(", Value: ");
184
184
Serial.println(analogRead(A0));
185
-
185
+
186
186
fflush(stdout);
187
-
187
+
188
188
int reading = analogRead(A0);
189
189
190
190
err = fprintf(f, "%s", "Reading Nr: ");
@@ -217,24 +217,24 @@ void WriteToFile() {
217
217
218
218
After logging data, remove the USB stick from your board, and insert it in your computer to see the data logged:
219
219
220
-

220
+

221
221
222
222
## USB Host Keyboard
223
223
224
-
It is possible to connect generic USB keyboards to the GIGA R1's USB-A connector without any additional circuitry.
224
+
It is possible to connect generic USB keyboards to the GIGA R1's USB-A connector without any additional circuitry.
225
225
226
-
The library used for this can be downloaded through Github.
226
+
The library used for this can be downloaded through Github.
Please note that this library is in **Alpha** development stage. This means support is experimental and examples may not function as expected. Future versions of this library may break the example provided below.
229
+
Please note that this library is in **Alpha** development stage. This means support is experimental and examples may not function as expected. Future versions of this library may break the example provided below.
230
230
231
231
***The USBHostGiga library is not available in the Arduino IDE and needs to be installed manually. You can do so my navigating to `Sketch` > `Include Library` > `Add .ZIP Library`.***
It is possible to turn your GIGA R1 board into a Human Interface Device **(HID)**, aka mouse & keyboard, using the [USBHID](https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/USBHID) library which is included in the GIGA Board Package.
237
+
It is possible to turn your GIGA R1 board into a Human Interface Device **(HID)**, aka mouse & keyboard, using the [USBHID](https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/USBHID) library which is included in the GIGA Board Package.
238
238
239
239
Among other things, you can:
240
240
- Create a custom keyboard, or a keyboard accessory,
@@ -243,9 +243,9 @@ Among other things, you can:
243
243
244
244
### Keyboard
245
245
246
-
***Important! When using the GIGA as a keyboard, make sure to include some sort of delay. Otherwise, you may end up printing things very fast, which can be an annoyance. If this happens nonetheless, double tap the reset button and upload a blank sketch to reset the board.***
246
+
***Important! When using the GIGA as a keyboard, make sure to include some sort of delay. Otherwise, you may end up printing things very fast, which can be an annoyance. If this happens nonetheless, double tap the reset button and upload a blank sketch to reset the board.***
247
247
248
-
To emulate a keyboard, we need to include `PluggableUSBHID.h` and `USBKeyboard.h`, and create an object using the `USBkeyboard` constructor.
248
+
To emulate a keyboard, we need to include `PluggableUSBHID.h` and `USBKeyboard.h`, and create an object using the `USBkeyboard` constructor.
249
249
250
250
```arduino
251
251
#include "PluggableUSBHID.h"
@@ -265,7 +265,7 @@ See the `DEC` column at [ascii-code.com](https://www.ascii-code.com/) to underst
265
265
To print a whole string, use the `printf()` method.
266
266
267
267
```arduino
268
-
Keyboard.printf("Hello World!");
268
+
Keyboard.printf("Hello World!");
269
269
```
270
270
271
271
To use modifiers and function keys, use the `key_code()` method.
0 commit comments