I'm trying to figure out if I can attach a MicroSD card to a Nano and have the Nano present itself as a USB storage device via the already available USB port. I'm already using digital ports D2-D13 to operate other stuff. D0 & D1 are available as are A0-A5, SCL & SDA, and the SPI pins.
I prefer a direct electrical connection to the Nano if possible. When attached to just power, say a USB charger, the stuff on D2-D13 will work their stuff. When attached to a computer, I would like the Nano to identify as storage and use the MicroSD card for that while still using D2-D13 for their things.
The closest thing I could find was this:
There is no mention of acting as a storage device.
Is what I want to do possible? If so, I do I go about it?
"I'm already using digital ports D2-D13"
then you are already out of luck. The SD libraries are written to access the SD/uSD cards via SPI pins D11-12-13 because those are the fast built-in SPI hardware pins.
PaulS:
Since a real thumb drive will be cheaper, and far easier to use, than the extra hardware, what is the point?
The added functionality would have been nice. It's not a huge deal.
CrossRoads:
"I'm already using digital ports D2-D13"
then you are already out of luck. The SD libraries are written to access the SD/uSD cards via SPI pins D11-12-13 because those are the fast built-in SPI hardware pins.
I can free up D11,12,&13. Would that help? Or do I still need extra hardware?
Yes, you still need additional hardware. You want something that acts like a USB master. The Arduino is a USB slave. You need additional hardware that can perform the USB master role, and get data to/from the Arduino.