Arduino Yun SD

Hi, It's about a couple of month I'm working in the free time with Arduino Yun. Every thing is working properly (Linux part, sketch part, wifi aso...). The only part that I have trouble with is writing to SD card. What I need is to have my SD card written "always".

It does'nt happen when I power off and on te module. The only way is to open the serial monitor but I have no possibility since it's not attached to my PC: I upload the sketch via wifi.

Looking on the web page on the arduino/www directory no log file is written. The sketch I started from is Meteo Yun by Mauro Alfieri.

Anybody can help me with this topic?

Thanks fghobbyst

I'm a bit unclear on the problem, but...

You can include Console.h and communicate using a network version of the console by using Console.println instead of Serial.println. That might help you debug your problem.

Is anything being successfully written to /mnt/sda1/ where the SD is actually mounted? Are your php files located there? Posting your actual sketch/code would probably help too.

Let’s see your sketch, please.

My guess is that it has this in setup(), which is present in many example sketches:

while(!Serial);

This statement will wait for a serial connection to be made, and will do nothing until you connect to the serial port with a PC. If you have this line in your sketch, remove it. The intent of that line is to pause until a connection is made, so that you can see all of the serial output from the sketch. While that’s useful for debugging, it’s a problem for code that needs to start by itself.