Arrays in preferences file
Posted: Sun Sep 15, 2024 9:13 pm
Hi.
I do need help with preferences.
I have a number of midi data, i need to store in preferences, or something like that.
My problem is how to store arrays within an array ?
I'm completly lost now.
Thanks for any help.
I do need help with preferences.
I have a number of midi data, i need to store in preferences, or something like that.
My problem is how to store arrays within an array ?
I'm completly lost now.
Thanks for any help.
- #include <Preferences.h>
- #define RO_MODE true
- #define RW_MODE false
- void setup() {
- Preferences midiPrefs;
- Serial.begin(115200);
- delay(250);
- midiPrefs.begin("myPrefs", RW_MODE);
- midiPrefs.clear();
- int16_t myArray1[3][4] = { {192, 3, 45, 0} , {176, 15, 95, 5} , {176, 3, 65, 3}};
- //int16_t myArray2[3][4] = { {192, 3, 45, 0} , {176, 15, 95, 5} , {176, 3, 65, 3}};
- //int16_t myArray3[3][4] = { {192, 3, 45, 0} , {176, 15, 95, 5} , {176, 3, 65, 3}};
- Serial.println("Printing myArray1...");
- for (int i = 0; i < 3; i++) {
- Serial.print(myArray1[i][0]); Serial.print(", ");
- }
- Serial.println("\r\n");
- }
- void loop() {
- }