From 46d2b1f6a466c2493b89325944a7136826c7bab2 Mon Sep 17 00:00:00 2001 From: Fede85 Date: Fri, 21 Jun 2013 19:48:56 +0200 Subject: renamed SD to FileSystem in FileIO library --- libraries/Bridge/examples/Datalogger/Datalogger.ino | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'libraries/Bridge/examples/Datalogger') diff --git a/libraries/Bridge/examples/Datalogger/Datalogger.ino b/libraries/Bridge/examples/Datalogger/Datalogger.ino index 5412631..dfd269f 100644 --- a/libraries/Bridge/examples/Datalogger/Datalogger.ino +++ b/libraries/Bridge/examples/Datalogger/Datalogger.ino @@ -8,8 +8,8 @@ * analog sensors on analog ins 0, 1, and 2 * SD card attached to SD card slot of the Arduino Yun - You are allowed to remove the SD card while the Linux and the - sketch is running but becareful to don't remove it while + You can remove the SD card while the Linux and the + sketch are running but becareful to don't remove it while the system is writing on it. created 24 Nov 2010 @@ -29,19 +29,11 @@ void setup() { // Initialize the Bridge and the Console Bridge.begin(); Console.begin(); + FileSystem.begin(); while(!Console){ ; // wait for Console port to connect. } - - // see if the card is present and can be initialized: - if (!SD.begin()) { - Console.println("SD card failed, or not present"); - // don't do anything more: - return; - } - Console.println("SD card initialized."); - } @@ -62,8 +54,8 @@ void loop () { // open the file. note that only one file can be open at a time, // so you have to close this one before opening another. - // The SD card is mounted at the following "/mnt/sda1" - File dataFile = SD.open("/mnt/sda1/datalog.txt", FILE_APPEND); + // The FileSystem card is mounted at the following "/mnt/FileSystema1" + File dataFile = FileSystem.open("/mnt/sda1/datalog.txt", FILE_APPEND); // if the file is available, write to it: if (dataFile) { -- cgit v1.2.3-18-g5258