I am using Arduino Mega with Arduino Ethernet shield for data logging.
My code collects data from sensors and logs to SD card only when serial monitor is ON. But it doesn’t even create a csv file when serial monitor is not open.
I want to log when Arduino is not connected with a computer i.e. standalone operation.
skimask:
Would you like it debugged for you as well?
I don't know how to debug when Arduino is not connected with Serial Monitor.
This code is able to log data when Arduino is connected using USB cable but not when disconnected.
If you’ve got some spare pins use some LEDs to indicate which path(s) the software is executing. Put some delays in as/if needed. It’s slower to debug but if you’re meticulous you can figure out what’s happening and what’s not and from that deduce what the problem is. You can use just the onboard LED if you don’t mind moving the “debug statement” around and doing multiple tests.