Pages: [1]   Go Down
Author Topic: Arduino as USB stick?  (Read 2642 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

Does anyone know if an Arduino board can act as a USB memory stick? Suppose you connect a SD card to the board, is it possible to use it so you can see/delete/add files on the connected SD card when plugged in the computer? If this is not possible, will it be with the upcoming Leonardo as it has usb host functionality?
I've searched Google but did not find an answer.

--
Thank you
Bart
Logged

Check out my Arduino projects website: http://www.arduinopassion.com

Germany
Offline Offline
Faraday Member
**
Karma: 56
Posts: 2973
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
usb host functionality
Is not what you need. As USB host, you can rather access other USB devices ( like USB sticks  or other Arduinos ).

First, you'd need to write / get a different Arduino driver for your PC. The existing one makes it behave like a serial COM port, not an external disk.
Then, you'd have to reprogram the Atmega16U2 as well, I fear, and have dedicated code on your Atmega 328 to address an SD card shield .
With that, you can't use the Arduino as an Arduino any more.

So the answer is No, IMO.

It were a rather expensive SD card reader.
And the advantage of SD cards is that you can easily get them in and out and move them around.

Logged

UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12520
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can make an Arduino emulate a user input device, but I don't know whether it can emulate a storage device. Would it not be simpler to use a standard USB/SD card reader? They are far cheaper than an Arduino.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I found it  smiley

Atmel and Arduino will be demonstrating several platforms in the Atmel-sponsored Arduino Pavilion including:
Arduino Leonardo. Based on the Atmel ATmega32u4, it is a low-cost Arduino board which includes a simpler circuit as the Arduino UNO board. The software on the board includes a USB driver that can simulate a mouse, keyboard and serial port. In addition, the bootloader includes a serial port and USB mass storage driver.

from http://www.atmel.com/about/news/release.aspx?reference=tcm:26-35030
The upcoming Leonardo will support it.

Thank you for the responses.
Logged

Check out my Arduino projects website: http://www.arduinopassion.com

Wellington, New Zealand
Offline Offline
Sr. Member
****
Karma: 1
Posts: 404
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have an R3 UNO with the atmega16u2 providing the USB interface then you should be able to use the LUFA library to implement a USB mass storage driver, turning your UNO into a USB storage device.
Logged


0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3469
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, in theory this is easy. In my experience though USB programming is tricky at least. Most probably way out of the reach of the average Arduino tinkerer. The most severe issue is that USB debugging is a non trivial issue. It also is necessary to have quite a reasonable grasp of how USB actually works.

IMHO it would be much simpler to connect the SD card in such a way that it will be directly connected to the computer and that Arduino can claim the connection when the contraption is not connected to the computer. However this is not trivial either because in order to manipulate files on the card from within the Arduino you need at least something like a filesystem driver which is not trivial either.
Logged

Check out my experiments http://blog.blinkenlight.net

Pages: [1]   Go Up
Jump to: