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.

30 lines
637B

  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 <SPI.h>
  7. #include <SdFat.h>
  8. SdFat sd;
  9. SdFile file;
  10. //------------------------------------------------------------------------------
  11. void setup() {
  12. Serial.begin(9600);
  13. while (!Serial) {} // wait for Leonardo
  14. if (!sd.begin()) {
  15. Serial.println("begin failed");
  16. return;
  17. }
  18. file.open("SIZE_TST.TXT", O_RDWR | O_CREAT | O_AT_END);
  19. file.println("Hello");
  20. file.close();
  21. Serial.println("Done");
  22. }
  23. //------------------------------------------------------------------------------
  24. void loop() {}