I’m running simple program in my arduino mega2560. this is my little project. i am using it for log my data. but i’ve problem that unsolved within weeks. my problem is lossing some data while write to sd card. Until the present, i’m still seeking the problem (hardware or software).
first, here is my listing program: (on attachment → .ino file)
and the result is become: (on attachment -->.txt file)
the result sometimes more bad than attached result. Sometimes it only a half. But it never have perfect result.
FYI i’ve tried some way to resolve my problem, but its can’t:
- i’ve triedwith standard lib SD card but it have same problem;
- now i used sd card typr HC class 6 with capacity 4 GB; and i’ve tried other type of sd card, but it got same problem, and sometime the other type is can’t detected by arduino.
- i’ve edited file SdFatConfig.h at line #define ARDUINO_FILE_USES_STREAM and #define SD_SPI_CONFIGURATION
- i’ve tried add some delay while write prosess to sd card
- i’ve tried add some .flush() while write some char into sd card
- Sd card formated by windows (fat32)
need some help for my problem please? :’(
(i’m realy sorry for my very bad english. hope can understand my problem, but thanks before)
trip03.txt (2.71 KB)
just_run_01.ino (8.46 KB)