Skip to content

Update giga-usb.md #1923

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void loop() {

### File Write

Below is an example sketch that can be used to **write** files from a USB mass storage device.
Below is an example sketch that can be used to **write** files to a USB mass storage device.

```arduino
#include <Arduino_USBHostMbed5.h>
Expand All @@ -264,8 +264,7 @@ Below is an example sketch that can be used to **write** files from a USB mass s
USBHostMSD msd;
mbed::FATFileSystem usb("usb");

// mbed::DigitalOut pin5(PC_6, 0);
mbed::DigitalOut otg(PB_8, 1);
mbed::DigitalOut otg(PB_15, 1);

void setup() {
Serial.begin(115200);
Expand All @@ -274,11 +273,13 @@ void setup() {
digitalWrite(PA_15, HIGH);

while (!Serial);

delay(2500);

msd.connect();

while (!msd.connected()) {
//while (!port.connected()) {
while (!msd.connect()) {
//while (!port.connect()) {
delay(1000);
}

Expand Down Expand Up @@ -574,4 +575,4 @@ The goal with this guide was to provide a summary of all the GIGA R1's features,
- Enabling and disabling the USB-A port.
- Read & Write to a USB mass storage device (MSD).
- Connecting keyboards and reading key presses.
- Emulate a mouse/keyboard through the HID interface.
- Emulate a mouse/keyboard through the HID interface.