Post Reply 
Arduino IL Drive Sim read good write bad
11-25-2019, 06:34 PM (This post was last modified: 11-25-2019 06:39 PM by Klaus Overhage.)
Post: #3
RE: Arduino IL Drive Sim read good write bad
Hello Tobie,
thank you for your fast reply. There are no errrors in serial monitor, when the system writes. I have tried the arduino SD test Programms CardInfo, Files and ReadWrite with success.

INITIALIZE a LIF append 256kByte to a file. I think the row
for (i = 0; i < 1024; ++i) // 640kb
in ildrive.cpp mean 256kb: 1024 times 256 byte

https://www.arduino.cc/en/Reference/SDopen
This page say, that open a file with the normal parameter FILE_WRITE mean that it is open for append, as for datalogging.

This page show a solution that work for me:
https://forum.arduino.cc/index.php?topic=506775.0
I change the both occurrence of FILE_WRITE in ildrive.cpp into O_RDWR and storing a program works!!!

Maybe the seek-command in ildrive.cpp can't go before the end of file anymore if the file is open for append. Maybe this was changed in the sd-library in the last years. Or the reason is my Arduino clone "ELEGOO Mega2560R3". I don't know...

Tobie, thank you very much for your work on the IL-Drive Simulator and your understandable and accessible program code. I am in the feeling of having understood this problem, at least a little …

Best Regards
Klaus
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Arduino IL Drive Sim read good write bad - Klaus Overhage - 11-25-2019 06:34 PM



User(s) browsing this thread: 1 Guest(s)