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.

34 satır
669B

  1. /*
  2. * Program to compare size of SdFat with Arduino SD library.
  3. * See SD_Size.ino for Arduino SD program.
  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. // Wait for USB Serial
  14. while (!Serial) {
  15. SysCall::yield();
  16. }
  17. if (!sd.begin()) {
  18. Serial.println("begin failed");
  19. return;
  20. }
  21. file.open("SizeTest.txt", O_RDWR | O_CREAT | O_AT_END);
  22. file.println("Hello");
  23. file.close();
  24. Serial.println("Done");
  25. }
  26. //------------------------------------------------------------------------------
  27. void loop() {}