USB Host Shield with FAT Library for Uno

Hello,

Recently i downloaded a library for using a USB Host Shield. That plugs into the Uno or Mega and provides access to devices that work with USB like USB thumb drives. The library required four other libraries, but once installed the FAT example which stores and reads files on the USB thumb drive compiles in the IDE.

There is a lot i dont know about this yet, but the main problem is that it will not compile the example sketch for reading and writing files on the USB thumb drive using the Uno as selected 'board', only with the Mega ADK board. The sketch apparently uses variables that are only defined for the Mega, and also uses too much memory for the Uno (around 48k).

I wanted to be able to use this with the Uno for reading and writing files to a USB thumb drive, and maybe a Nano with a little hand wiring between boards.

So the question is, is this possible and is there an example that uses the Uno instead of the Mega?
The program will have to be able to read and write files on the USB stick (thumb drive).

A side question is, does anyone know if there is a limit on the size of the thumb drive even when used with the Mega?

Recently i downloaded a library for using a USB Host Shield.

I'm not going to tell you which one, or where I got it.

The library required four other libraries

I'm not going to tell you which ones.

but once installed the FAT example which stores and reads files on the USB thumb drive compiles in the IDE.

I'm not going to tell you which example, or show the code.

So the question is, is this possible

Obviously not, using the mysterious code you didn't post.

A side question is, does anyone know if there is a limit on the size of the thumb drive even when used with the Mega?

45 cubic yards.

Hello there,

Wow, that thumb drive sounds like it has enough storage to download the whole internet into :slight_smile:

I thought someone would know right off the bat as i cant be the only person who ever tried to use a USB host shield with the Arduino to store data on a USB thumb drive. I would think this would be a very popular item.

Main software:

Example:
testusbhostFAT

The example also contains links to the other four libraries, but one of them is unimportant as it is the RTC lib.

The board is the "Keyes" usb host shield for the Arduino. This is available in several places on the web for purchase. It's basically a pc board with a USB female A connector so you can plug in a flash drive, mouse, keyboard, etc., and the example code will get something up and running for those.
The testusbhostFAT is the only one i am concerned with, as that allows reading and writing files for something such as a data logger.

Hello again,

No ideas? Thia cant be the first anyone has ever heard of this :slight_smile:

At this point i'll take ANY library that can do USB host, that is made for a USB host board. If it is different it may help anyway.