Hello, This may be an unusual question but I am hoping someone could help.

I have a project that is utilizing the Adafruit Data Logging Shield. I have all the writing capabilities working correctly, but there is one more issue that needs to be addressed.

The card reader begins writing to the SD card only once the serial monitor is called (when hooked up to the computer). Is there a way to "call" the serial monitor when the Arduino is not hooked up to a computer? I am envisioning using a tactile button that would be programmed to start the SD card writing. Any ideas?

The card reader begins writing to the SD card only once the serial monitor is called (when hooked up to the computer).

This (the opening of the serial monitor) generates a reset on the Arduino, so you can just push the reset button to get the same effect. If this doesn't work, post your code to enable us to find the bug.

Thank you for your response.The reset button does not initiate the SD card writing. It would be perfect if that worked like that. As far as I can tell the reset only causes the Arduino to reconnect to the computer, but does not start the SD card record.

I am using the Leonardo, with a TransmogriShield which receives the Adafruit Data Logging Shield.

The code was pieced together from a couple examples and the data is being read correctly from A0-A3:I was thinking maybe there was a way to call the Setup function from the main loop??

// the hardware CS pin (10 on most Arduino boards,// 53 on the Mega) must be left as an output or the SD library// functions will not work.const int chipSelect = 10;

RTC_DS1307 RTC; //Define RTC Clock name

void setup(){ // Open serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only }

// If you want to set the aref to something other than 5vanalogReference(EXTERNAL); //This needed!

//Initialize RTC Communitcation Wire.begin(); RTC.begin(); if (! RTC.isrunning()) { Serial.println("RTC is NOT running!"); // following line sets the RTC to the date & time this sketch was compiled RTC.adjust(DateTime(__DATE__, __TIME__)); }

//Initialize SD card communication Serial.print("Initializing SD card..."); // make sure that the default chip select pin is set to // output, even if you don't use it: pinMode(10, OUTPUT);

// see if the card is present and can be initialized: if (!SD.begin(chipSelect)) { Serial.println("Card failed, or not present"); // don't do anything more: return; } Serial.println("card initialized.");}

while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only }

The mentioned code waits till the Leonardo has initialized it's USB serial driver but if the Leonardo is not connected to a host or the port not opened this will never happen. This code ensures that all serial data is being sent to the host but you don't care. You can do the wait with a timeout if you want to keep the original functionality without loosing the debugging possibility.