The Arduino_UnifiedStorage library provides a unified interface to access different types of storage, including internal storage, SD cards, and USB mass storage devices. It simplifies the handling of files and directories across multiple storage mediums on Portenta, Opta, and some Nicla boards.
examples/SimpleStorageWriteRead - Write/read simple data from SD, USB and internal storage
examples/AdvancedUSBInternalOperations - Navigate file structure and demonstrate file operations between USB and internal storage
examples/BackupInternalPartitions - Back up all partitions on the internal storage to a USB Mass Storage device.
examples/Logger - This example demonstrates how you can log sensor data into its internal storage and detect the insertion of a USB drive. When a USB drive is connected, it selectively transfers only the new data to the USB mass storage device. Even if you remove the USB drive, the device continues to log data in its internal storage. This capability is particularly valuable for accumulating training data required for embedded machine learning applications.
examples/InternalStoragePartitioning - Demonstrates how you can use the Arduino_UnifiedStorage library to create and read partitions on the Internal QSPI Storage.
This library has been tested with the following STM32 and Renesas based Arduino boards. The availability of storage mediums depends on the hardware interfaces:
The library allows you to connect a USB drives in a couple of different ways:
Note: Due to the extremely large selection of USB Mass Storage devices on the market, we cannot guarantee compatibility with your USB thumb drive. However, we had great results with drives from reputable brands such as Kingston, SanDisk, Samsung, etc.
Note: Due to an unforeseen compatibility issue on the Portenta Breakout Board, inserting a USB drive on the USB-A port of the breakout board may occasionally cause a reboot on Portenta C33 boards. You can work around this issue by connecting your USB Mass Storage device through a USB hub. Please note that the USB Callback functionality on the Portenta C33 boards might also be affected by this issue.
This limitation only affects Portenta C33 boards.
For more information about this library please read the documentation here.