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.

27 lines
601B

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