You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
619B

  1. /*
  2. * Sketch to compare size of SdFat V2 with Arduino SD library.
  3. * See SD_Size.pde for Arduino SD sketch.
  4. *
  5. */
  6. #include <SdFat.h>
  7. SdFat sd;
  8. SdFile file;
  9. //------------------------------------------------------------------------------
  10. void setup() {
  11. Serial.begin(9600);
  12. while (!Serial) {} // wait for Leonardo
  13. if (!sd.begin()) {
  14. Serial.println("begin failed");
  15. return;
  16. }
  17. file.open("SIZE_TST.TXT", O_RDWR | O_CREAT | O_AT_END);
  18. file.println("Hello");
  19. file.close();
  20. Serial.println("Done");
  21. }
  22. //------------------------------------------------------------------------------
  23. void loop() {}