Advertisement
mentaluproar

Schrödinger's file

Jun 1st, 2017
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include "SdFat.h"
  2.  
  3. SdFatSdioEX sdcard;
  4. File testfile;
  5.  
  6. void setup() {
  7. // put your setup code here, to run once:
  8. Serial.begin(9600);
  9. Serial.println("connected at 9600");
  10. sdcard.begin();
  11. if(sdcard.exists("testfile.csv")){
  12. Serial.println("testfile.csv found!");
  13. }
  14. if (!sdcard.exists("testfile.csv")); {
  15. Serial.println(F("testfile.csv not found. Creating new file."));
  16. testfile = sdcard.open("testfile.csv", O_CREAT | O_WRITE);
  17. testfile.close();
  18. }
  19. }
  20.  
  21. void loop() {
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement