I am using the "SD read/write" code from the Arduino IDE examples to test an ethernet shield (clone). The problem is that although a file is created no data is stored in it.
When running the serial monitor will only show the first characters of the Serial.print() sentences, e.g when doing Serial.print("Initializing SD card...") the serial monitors displays Ini or In and nothing else. Also the IDE shows the following error message: (some words in spanish)
Error dentro de Serial.serialEvent() java.io.IOException: Error de entrada/salida in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1598) at processing.app.Serial.serialEvent(Serial.java:258) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:774) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1644)
I have tried with 2 different SD cards, including a brand new one, and 2 different Arduino Uno (a clone and an original one). The OS is Ubuntu 13.10.
My guess is that it has something to do with the myFile.println() sentences, when they are commented the serial monitor works fine.
Any help is much appreciated since I couldn't find the problem anywhere else so far!