USB mass storage device on Teensy 4.1

drwendell

Member
I've been trying to compile the example code related to mass storage devices connect to the USB host on a teensy 4.1, but I receive the error: 'msController' does not define a type. I am using Arduino IDE 2.0.0 with teensyduino 1.57. I have downloaded the library "UsbMscFat-UsbMscFat-FS_DATES". Specifically I have tried to compile "DataloggerUSB.ino", "ReadWriteUSB.lino" and "FilesUSB.ino" and they all fail.

Does anyone have any ideas?
 
Sorry you don't need that library anymore. It should all be built into USBHost_t36 library now.

Look under the examples of that library in the sub-directory storage.
 
I've been trying to compile the example code related to mass storage devices connect to the USB host on a teensy 4.1, but I receive the error: 'msController' does not define a type. I am using Arduino IDE 2.0.0 with teensyduino 1.57. I have downloaded the library "UsbMscFat-UsbMscFat-FS_DATES". Specifically I have tried to compile "DataloggerUSB.ino", "ReadWriteUSB.lino" and "FilesUSB.ino" and they all fail.

Does anyone have any ideas?

Sorry for the late response. As @KurtE stated you need to use the latest examples in USBHost_t36.
I have modified a few of the the examples in the UsbMscFat library to be compatible with TD1.57. These are the ones you mentioned in post #1. I have also since added a big old 'OBSOLETE' warning in that library:)

Let me know they don't work out for you..
 

Attachments

  • USBMSCExamples.zip
    7.7 KB · Views: 156
Thank you. I got the ones in USBHost_t36 working, but there aren't any that directly show reading/writing to a file on the USB device. This is why I was looking at the ones in the other libraries. I think I managed to figure out how to write to a file, but it would be nice if there were some examples in the library. Thanks again.
 
Thank you. I got the ones in USBHost_t36 working, but there aren't any that directly show reading/writing to a file on the USB device. This is why I was looking at the ones in the other libraries. I think I managed to figure out how to write to a file, but it would be nice if there were some examples in the library. Thanks again.

Your welcome. I also added an example of copying a file which also shows reading/writing files.

Good luck:)
 
Back
Top