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.

31 lines
623B

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