diff options
author | Cristian Maglie <c.maglie@bug.st> | 2013-06-07 18:35:30 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2013-06-07 18:35:30 +0200 |
commit | 9a0621aad7382d0d51dffd49a41110050f611a57 (patch) | |
tree | 7000de4a63524aabc5e9a3264b10fe81275a43fd /libraries/Bridge/examples/FileTest/FileTest.ino | |
parent | 68f220114f9887bd374bd7341930468042af6d2f (diff) |
Updated File example
Diffstat (limited to 'libraries/Bridge/examples/FileTest/FileTest.ino')
-rw-r--r-- | libraries/Bridge/examples/FileTest/FileTest.ino | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/libraries/Bridge/examples/FileTest/FileTest.ino b/libraries/Bridge/examples/FileTest/FileTest.ino deleted file mode 100644 index 3fd7ce9..0000000 --- a/libraries/Bridge/examples/FileTest/FileTest.ino +++ /dev/null @@ -1,50 +0,0 @@ - -#include <FileIO.h> - -void setup() { - Bridge.begin(); - SD.begin(); - - boolean r; - r=SD.exists("/arduino/test"); - if (r) error("1"); - r=SD.exists("/arduino"); - if (!r) error("2"); - - r=SD.mkdir("/arduino/test"); - if (!r) error("3"); - r=SD.exists("/arduino/test"); - if (!r) error("4"); - - File f = SD.open("/arduino/test/bla", FILE_WRITE); - if (!f) error("5"); - f.println("CIAO!"); - f.close(); - - delay(10000); - - r=SD.rmdir("/arduino/test"); - if (r) error("6"); - r=SD.remove("/arduino/test"); - if (r) error("7"); - - r=SD.remove("/arduino/test/bla"); - if (!r) error("8"); - r=SD.rmdir("/arduino/test"); - if (!r) error("9"); - r=SD.exists("/arduino/test"); - if (r) error("10"); -} - - -void error(const char *s) { - Bridge.print("# ERROR "); - Bridge.println(s); - while (true); -} - -void loop() { -} - - - |