Comment 1 by Aurelio Bignoli, Aug 17, 2009
Sorry, I had a problem with file attachment, the test sketch is the
following:
#include <mmc.h>
#include <SDuFAT.h>
#include <microfat.h>
char myBuffer[257];
void setup (void) {
Serial.begin (9600);
Serial.println ("In order to run this test, hola.txt must be
empty.");
Serial.println ("You can use the hola.txt file included in
SDuFAT.zip\n");
Serial.println ("Send a character to write first
block");
while (Serial.available() == 0);
Serial.read();
for (int i=0; i<=256; i++) {
myBuffer[i] = 'A';
}
myBuffer[256] = 0;
int result = SD.print ("hola.txt", myBuffer);
Serial.print ("First block written, result = ");
Serial.println (result, DEC);
Serial.println ("Send a character to write second
block");
while (Serial.available() == 0);
Serial.read();
for (int i=0; i<=256; i++) {
myBuffer[i] = 'B';
}
myBuffer[256] = 0;
result = SD.print ("hola.txt", myBuffer);
Serial.print ("Second block written, result = ");
Serial.println (result, DEC);
Serial.println ("Send a character to write the final
string");
while (Serial.available() == 0);
result = SD.print ("hola.txt", "ciao");
Serial.print ("Final result = ");
Serial.println (result, DEC);
}
void loop () {}
Comment 2 by Aurelio Bignoli, Aug 17, 2009
My environment: Linux, Arduino 0016 and 0017, avr-gcc 4.3.3, ATmega328.
Sign in to reply to this comment.
Reported by Aurelio Bignoli, Aug 17, 2009