Skip to content

Commit 6b89dac

Browse files
committed
Fix Invalid DB error cause of SD Library in Uno example
1 parent 76e923d commit 6b89dac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/Uno_and_above/Uno_and_above.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ void log_analog_data() {
275275
dly = input_num();
276276

277277
SD.remove(filename);
278-
myFile = SD.open(filename, FILE_WRITE);
278+
myFile = SD.open(filename, O_READ | O_WRITE | O_CREAT);
279279

280280
// if the file opened okay, write to it:
281281
if (myFile) {

0 commit comments

Comments
 (0)