5:47 pm
August 5, 2015
Has anyone got the shipping examples to write and then read data from an SD card?
I found a number of issues. In the host VI you must add a delay after the serial buffer flush, and the subsequent data read, to get it to work at all. ( I added 3 secs, to wait for reboot after the compile). Then it is supposed to read "ACC4LV Rocks!!" back, but I get " ocks!!-Examp *Examp/". (The asterisk represents an ASCII character I cannot reproduce)
The correct number of characters is returned, and the "Examp" is supposed to be the directory and/or filename, so something has been written but it is all messed up. The "Data Header" string does not show up anywhere.
When I put the SD card in a win 7 computer, it appears blank. Perhaps this is to be expected as its probably not a PC compatible file format?
Any help would be appreciated.
Tronron
1:48 pm
March 12, 2015
Hello;
We haven't experienced any issues with this shipping example. In fact, we have heard from several other users they were able to use it without any problems. The files that are written to the SD Card should be compatible with a windows PC. Have you tried using a comparable example from the Arduino IDE and check if you get the expected result? I believe that should be your next step in debugging your setup. If the Arduino IDE example doesn't work, you probably have a hardware issue.
Filipe
Cheers
Filipe
9:27 am
February 2, 2018
I have also issues with SD card. Example file "SD Card - Log Data.vi" works when but when I modified so that I can call, it does not even compile. Even I moved everything to my main vi, the card contains empty file with no data.
Hannu
Compile error:
1.0.0.21, Arduino/Genuino Uno
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
C:\Users\XXX\AppData\Local\Temp\58e9973bb6e2e908c6c199f5a9d39075.tmp\temp\temp.ino: In function 'void write_String_to_SD_card(boolean, unsigned char, boolean, String, boolean, String)':
temp:39: error: expected ';' before 'Node1699Out_temp'
File Node1699Out_temp;
^
temp:43: error: 'Node1699Out_temp' was not declared in this scope
Node1699Out_temp = SD.open(File_51.c_str(), FILE_READ);
^
temp:47: error: 'Node1699Out_temp' was not declared in this scope
Node1699Out_temp = SD.open(File_51.c_str(), FILE_WRITE);
^
temp:49: error: 'Node1699Out_temp' was not declared in this scope
Node1699Out = (int)&Node1699Out_temp;
^
temp:50: error: expected primary-expression before ')' token
((File*)Node1699Out)->write((char*)Data_322.c_str(), Data_322.length());
^
temp:50: error: expected ')' before 'Node1699Out'
((File*)Node1699Out)->write((char*)Data_322.c_str(), Data_322.length());
Multiple libraries were found for "SD.h"
^
temp:51: error: expected primary-expression before ')' token
Used: C:\Users\XXX\Documents\Arduino\libraries\SD
((File*)Node1699Out)->close();
^
temp:51: error: expected ')' before 'Node1699Out'
Not used: C:\Program Files (x86)\Arduino\libraries\SD
((File*)Node1699Out)->close();
^
exit status 1
6:32 am
February 2, 2018
13
1 Guest(s)