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
I wrote a simple sketch for the Opta that creates a new file in the root folder of a connected USB device and then writes inside it.
I planned to use the connection callback to immediately initialize the USB storage, but unfortunately it did not work. In fact the following sketch cannot create a new file:
Furthemore, I suspect the storage might not be initialized at all when using the above code, as a simple call to root.exists() in the loop would halt the execution causing a board reset.
If I instead move the storage initialization code in the loop() function, the sketch works as expected. I will attach the functioning sketch below for completeness:
I wrote a simple sketch for the Opta that creates a new file in the root folder of a connected USB device and then writes inside it.
I planned to use the connection callback to immediately initialize the USB storage, but unfortunately it did not work. In fact the following sketch cannot create a new file:
Click to expand
Furthemore, I suspect the storage might not be initialized at all when using the above code, as a simple call to
root.exists()
in the loop would halt the execution causing a board reset.If I instead move the storage initialization code in the
loop()
function, the sketch works as expected. I will attach the functioning sketch below for completeness:Click to expand
I did not find any mention of this behavior in the docs. If I can provide further details or assistance ping me!
The text was updated successfully, but these errors were encountered: