You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example demonstrates the usage of the "Arduino_UnifiedStorage" library for logging and backing up data to USB storage in case a USB Mass Storage device is inserted.
3
+
4
+
The code defines two main functions: "logData" and "performUpdate".
5
+
The "logData" function logs sensor data by reading an analog sensor and writing the data to the log file.
6
+
7
+
The "performUpdate" function performs the update process by:
8
+
* reading the last update size from a file (number of bytes)
9
+
* copying the new data from the log file to a backup file
10
+
* and updating the last update size.
11
+
12
+
INSTRUCTIONS
13
+
* Make sure the QSPI storage of your board is properly partitioned.
14
+
* You can do that by flashing the QSPIFormat example that can be found in the STM32H747_System folder
15
+
* Open the serial monitor and select answer with "Y" when this appears "Do you want to use partition scheme 1? Y/[n]"
16
+
* Reboot the board
17
+
* Connect a RS485-enabled device to see the debugging output.
18
+
* This sketch will log data, and check if there is any USB MSD Device connected to the USB Port of the Opta.
19
+
The USB device is mounted and unmounted after every update operation. The first status LED is on when the USB drive is mounted.
20
+
So as long as the status LED is off you can safely remove the drive.
21
+
The skecth will log to internal storage in the meantime, and wait for the USB drive to be inserted again.
0 commit comments