diff --git a/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/giga-usb.md b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/giga-usb.md index 662a5b5ccc..a1a0c7ed43 100644 --- a/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/giga-usb.md +++ b/content/hardware/10.mega/boards/giga-r1-wifi/tutorials/giga-usb/giga-usb.md @@ -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 @@ -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); @@ -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); } @@ -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. \ No newline at end of file +- Emulate a mouse/keyboard through the HID interface.