Skip to content

Commit 20f1ec3

Browse files
committed
test
1 parent 66b4603 commit 20f1ec3

File tree

1 file changed

+14
-14
lines changed
  • content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb

1 file changed

+14
-14
lines changed

Diff for: content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/giga-usb.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The GIGA R1 has two USB connectors:
4444

4545
***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.***
4646

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.
4848

4949
![Keyboard connected to USB-A port.](assets/giga-keyboard-connect.png)
5050

@@ -158,7 +158,7 @@ void setup() {
158158
;
159159
}
160160
Serial.print("read done ");
161-
161+
162162
//function to write to file
163163
WriteToFile();
164164
}
@@ -182,9 +182,9 @@ void WriteToFile() {
182182
Serial.print(count);
183183
Serial.print(", Value: ");
184184
Serial.println(analogRead(A0));
185-
185+
186186
fflush(stdout);
187-
187+
188188
int reading = analogRead(A0);
189189
190190
err = fprintf(f, "%s", "Reading Nr: ");
@@ -217,24 +217,24 @@ void WriteToFile() {
217217

218218
After logging data, remove the USB stick from your board, and insert it in your computer to see the data logged:
219219

220-
![Data logged in .txt file.](assets/giga-file-write.png)
220+
![Data logged in .txt file.](./assets//giga-file-write.png)
221221

222222
## USB Host Keyboard
223223

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.
225225

226-
The library used for this can be downloaded through Github.
226+
The library used for this can be downloaded through Github.
227227
- [USBHostGiga](https://github.com/arduino-libraries/USBHostGiga)
228228

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.
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.
230230

231231
***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`.***
232232

233233
<CodeBlock url="https://github.com/arduino-libraries/USBHostGiga/blob/master/examples/KeyboardGiga/KeyboardGiga.ino" className="arduino"/>
234234

235235
## USB HID
236236

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.
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.
238238

239239
Among other things, you can:
240240
- Create a custom keyboard, or a keyboard accessory,
@@ -243,9 +243,9 @@ Among other things, you can:
243243

244244
### Keyboard
245245

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.***
247247

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.
249249

250250
```arduino
251251
#include "PluggableUSBHID.h"
@@ -265,7 +265,7 @@ See the `DEC` column at [ascii-code.com](https://www.ascii-code.com/) to underst
265265
To print a whole string, use the `printf()` method.
266266

267267
```arduino
268-
Keyboard.printf("Hello World!");
268+
Keyboard.printf("Hello World!");
269269
```
270270

271271
To use modifiers and function keys, use the `key_code()` method.
@@ -284,7 +284,7 @@ Keyboard.media_control(KEY_NEXT_TRACK);
284284

285285
### Mouse
286286

287-
To emulate a mouse, we need to include `PluggableUSBHID.h` and `USBMouse.h`, and create an object using the `USBMouse` constructor.
287+
To emulate a mouse, we need to include `PluggableUSBHID.h` and `USBMouse.h`, and create an object using the `USBMouse` constructor.
288288

289289
```arduino
290290
#include "PluggableUSBHID.h"
@@ -322,7 +322,7 @@ Mouse.press(MOUSE_MIDDLE);
322322
323323
delay(1000);
324324
325-
Mouse.release();
325+
Mouse.release();
326326
```
327327

328328
## Summary

0 commit comments

Comments
 (0)