If you are talking about the USBHost connector then the answer is yes. You will need a USB SD card reader. Then in Teensyduino 1.59 try the driveinfo.ino sketch found in "USBHost_t36/examples/storage" folder. There are a couple other sketches as well...Hello
Using a Teensy 4.1 with sd card, is it possible to read and write files on the sd card via the usb connector? If yes, how?!
Thanks Paul! I will try what you suggest. Will it let me see the built in sd card via the usb port I use to upload firmware?In Arduino IDE, first make sure Teensy is selected in Tools > Board. The menus update based on which board you're using. Then click File > Examples > USBHost_t36 > Storage to find those examples. Hopefully those can help get you to a good start.
I meant the built in SD card, and the usb connector we use to upload the firmware. Sorry if wasn’t clear.
Indeed it’s far simpler to just remove the card of course. But, so far, I’m working on three projects where repeatedly removing the card to examine its contents is needed and this is costing us extra time - especially when the card and the Teensy 4.1 are inside a closed case.For the Teensy 4.1 built in SD card, you need the examples from File > Examples > SD. Those examples default to the regular SPI port, which would be used with the audio shield or other hardware you'd connect to the SPI pins. To use the built in SD card, you need to edit the code. See the comments in those examples for instructions.
For the main USB device port you connect to your PC, you probably want MTP protocol. It's still considered experimental. You need to select it in the Tools > USB Type menu. You also need Kurt's MTP library. Like with the SD library, the examples require some editing to configure which media gets shown to your PC.
If using MacOS, you'll need the Android File Transfer program. MTP is native with Windows and Linux, so no special software needed. The drives you publish with the MTP library should appear automatically.
It might be simpler to just physically put the SD card into a regular SD card reader connected to your PC.