Historically, getting files on to a microcontroller device was a fraught process. You might have found yourself placing image data manually into arrays in code, or perhaps repeatedly swapping SD cards in and out. For select Arduino boards, that’s no longer a problem – thanks to the new TinyUSB library from Adafruit (Youtube link, embedded below).
The library is available on Github, and is compatible with SAMD21 and SAMD51 boards, as well as Nordic’s NRF52840. It allows the Arduino board to appear as a USB drive, and files can simply be dragged and dropped into place. The library can set up to use SPI flash, SD cards, or even internal chip memory as the storage medium.
Potential applications include images, audio files, fonts, or even configuration files. Future plans include porting the TinyUSB library to the ESP32-S2 as well. Being able to drag a settings file straight on to a board could make getting WiFi boards online much less of a hassle.
We’ve seen other nifty USB libraries before, VUSB is a great option if you need USB on your AVR microcontroller. Video after the break.
11 thoughts on “Drag And Drop Files On Select Arduino Boards”
do you sell this thing
Does who sell what? The video features the Adafruit PyBadge, if that’s what you’re asking. https://www.adafruit.com/product/4200
I think this is super cool because it places accessibility into the hands of future engineers that otherwise wouldn’t know that was their destiny but onto the contrast of are we making embedded microcontollers easier to “flash”, or are we trying to turn microcontrollers into sbc’s….
It depends on the person’s application. I can easily see this becoming a multipurpose gateway, coupled with the correct wireless module.
So it’s better to have microcontrollers do some of the tasks that SBCs are doing these days, and reducing power consumption a bit.
Not a hack and definitely not new – mbed has had this for a decade, commercial stuff has had this for even longer…
Right… well… now it’s available for Arduino, good news!
I agree this is not a hack, it’s too good to be called a hack. It will allows some cool hacks though.
The Leonardo could do this 7 years ago.
@nfg do you have a link or anything that has code for the Arduino Leonardo from 7 years ago being able to show up as a USB drive on Mac, Win, etc. for moving files to and from it as storage?
@nfg thanks for the links, not the same exactly, but does USB in some way, so totally understand why it would seem similar :)
LUFA is not integrated with arduino (could not use LUFA and arduino at the same time… easily) and is no longer maintained or supports any of the latest chips.
teensyduino has some USB support, only for teensy, and does not work on other platforms.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)