Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

How to dump contents of file on SD card to serial

Home Forums Mayfly Data Logger How to dump contents of file on SD card to serial

Viewing 1 reply thread
  • Author
    • #15641

      I had a working sketch that allowed me to transfer the contents of a file on the SD card using bluetooth. I switched over to the Mayfly board and am now using code from the menu-a-la-carte; however, when incorporating the lines of code previously used to dump the file contents. I get an error indicating ‘reference to File is ambiguous’. I think this has something to do with how Loggerbase.h and SD.h name files. The lines of code to execute the file dump is contained in Void ShowData() in the sketch. Anyone able to do this for their own sketches?


    • #15665
      Scott Ensign

      Hi @Selbig. Here is a very simple sketch that prints a file from the microSD card to the serial monitor. It might be too rudimentary for your purposes, but thought I would share it here. Notice the line “// SD.remove(“datalog.txt”);” is commented out. Uncomment this line to DELETE the file specified instead of printing it to the serial monitor. I find it is helpful for my work to have this option available when I need it.


Viewing 1 reply thread
  • You must be logged in to reply to this topic.