Home › Forums › Mayfly Data Logger › Recording data from pressure sensors on an SD card › Reply To: Recording data from pressure sensors on an SD card
MillerG, thanks for posting your question here!
In the meanwhile, have you successfully run the “Simple File Example” sketch? It’s here: https://envirodiy.org/mayfly/software/simple-file/; and also on GitHub here: https://github.com/EnviroDIY/EnviroDIY_Mayfly_Logger/tree/master/examples.
Last, if you are using an SD card that is larger than about 4 GB, you’ll probably need to use a newer Arduino SD library that we are now using: https://github.com/greiman/SdFat. This library can handle SDHC cards with up to 32 GB of capacity. So, if you can’t get our “Simple File Example” to work, then download and put this SdFat folder in your ~/Documents/Arduino/Libraries directory. Then you should be able to replace
1 |
#include <SD.h> |
with this code to your “Simple File Example” or any other sketch:
1 2 3 |
#include <SdFat.h> // File system object. SdFat sd; // reassigns all sd functions to SdFat functions |
Let us know if you are successful with any of this.
If that works then try to merge the code in the “Simple File Example” with the code that you have working for your sensor.
If you still need help. It would be great if you could post your code, using the “Add Code Snippet” button at the top of the forum post editor, or by attaching files to your post via the button at the bottom of the forum post editor.
Last, we’re working on an easy to use ModularSensors library (https://github.com/EnviroDIY/ModularSensors) that will integrate SD logging, radio communication, solar-charing and sleep functions for a set of preselected sensors. Unfortunately your sensor is not on that list at this time, but we could consider adding it in the future (or you could help us)!