Search code examples
arduinoarduino-ideusb-hostcontroller

USB host shield on Arduino Uno


I downloaded USB host shield code from the following website: https://github.com/felis/USB_Host_Shield_2.0/archive/master.zip. This contains too many files to which one I have to include for my application.

I want to know if USB host shield can be mounted to work in Arduino Uno. If yes can anybody provide me sample code to read SD card text file using USB host shield for Arduino Uno ?


Solution

  • I suppose that by "reading a SD card text file" you mean plug a SD card in a SD-USB adapter and then reading the file from it.

    If so, there should be an example in the library called testusbhostFAT (here you will find the online version) where they read files stored in a FAT HDD (and I think that SD-USB adapters are seen as HDDs or FDDs).

    Anyway they explicitly say that

    This will not run a Arduino Uno due to the limited ram available in the ATmega328p.

    By looking at the code maybe you will manage to slim it enough to run it on a Uno, but... Well, probably it's a bit hard.

    Bye