Coder Social home page Coder Social logo

ddmesh / arduino_unifiedstorage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arduino-libraries/arduino_unifiedstorage

0.0 0.0 0.0 2.14 MB

Read and write files to flash, USB mass storage and SD cards in a unified way.

License: GNU Lesser General Public License v2.1

C++ 98.26% C 1.74%

arduino_unifiedstorage's Introduction

๐Ÿ’พ Unified Storage Library

Check Arduino Compile Examples Spell Check Sync Labels

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

  • 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.

๐Ÿ‘€ Instructions

  1. Download and install this library
  2. Check compatibility with your platform
  3. Check out the examples or read read the documentation here.

โœจ Features

  • Access files and directories on internal storage, SD cards, and USB mass storage devices.
  • Read and write data to files.
  • Create, remove, and rename files and directories.
  • Copy and move files and directories.
  • List files and subfolders in a directory.
  • Manipulate files and folders from one storage medium to another
  • Format partitions and drives (FAT and LittleFS)
  • Create and modify partitions on the internal storage
  • Register callbacks whenever a USB Mass Storage device has been inserted or removed
  • Get verbose output of every action the library performs for seamless debugging

Compatibility

This library has been tested with the following STM32 and Renesas based Arduino boards. The availability of storage mediums depends on the hardware interfaces:

  • Portenta Machine Control: USB and Internal QSPI Flash
  • Portenta H7 + Portenta Breakout: USB, SD, and QSPI
  • Portenta H7 + Vision Shield: SD and QSPI
  • Portenta C33 + Portenta Breakout: USB, SD, and QSPI
  • Portenta C33 + Vision Shield: SD and QSPI
  • Opta: Internal QSPI Flash and USB

The library allows you to connect a USB drives in a couple of different ways:

  • Use the USB-C port on the board: Ensure Serial functionality is not in use on the same port to prevent conflicts.
  • Connect to the USB-A port: Located on the Portenta Breakout
  • Use a USB Hub: Note that while our some USB Hubs are supported, we cannot ensure compatibility with all USB Hubs. Especially for when used together with advanced features like Ethernet or HDMI, such as certain USB-C hubs.

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.

๐Ÿ“– Documentation

For more information about this library please read the documentation here.

arduino_unifiedstorage's People

Contributors

aentinger avatar aliphys avatar alrvid avatar cristidragomir97 avatar dependabot[bot] avatar facchinm avatar locatw avatar per1234 avatar sebromero avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.