So, I have an Arduino and would like to implement a flash disk functionality into my ESP32 Thing.
However, since ESP32 does not have USB functionality, I must use Arduino which does. So basically, I want to be able to do something like
#include <flashdisk.h>
#include <Serial.h>
String code = "none";
FlashDisk disk();
Serial.begin(9600);
disk.begin();
disk.await_user_write(); //Waits until the user writes to the drive
code = disk.read("code.py")
Serial.println(code);
disk.create("hello.py")
disk.write("hello.py","print('hello world')");
disk.delete("delete_me.py");
disk.commit(); //Finalize changes
It is the Due and it should 'only' read the flash drive.
OP didn't mention an SD card but reading/writing to the flash memory (at least that was my interpretation of the post, I'm not a native speaker).
And my interpretation of the pseudo code he supplied is that he wants to read/write/delete files. Of course using the SD card this is possible but extremely slow compared so a $1.50 USB reader.