Modifications

Sauter à la navigation Sauter à la recherche
Ligne 145 : Ligne 145 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
Just like using the Arduino SD card library you create a '''File''' object by calling an '''open''' function and pointing it at the name of the file and how you'd like to open it ('''FILE_WRITE''' mode, i.e. writing new data to the end of the file).  Notice however instead of calling open on a global SD card object you're calling it on a '''fatfs''' object created earlier in the sketch (look at the top after the #define configuration values).
+
Comme vous le feriez avec la bibliothèque Arduino de la carte SD, vous pouvez créer un objet '''File''' en appelant la fonction '''open''' en indiquant le nom de fichier et le mode d'accès (le mode '''FILE_WRITE''', écrit de nouvelles données en fin de fichier). <font color="red">'''Notez cependant'''</font> qu'à la place d'appeler la fonction global {{fname|open}}, c'est la méthode {{fname|fatfs.open()}} de l'objet système_de_fichier nouvellement créé qu'il faut appeler (voyez les valeurs de configurations juste après #define).
    
Once the file is opened it's simply a matter of calling '''print''' and '''println''' functions on the file object to write data inside of it.  This is just like writing data to the serial monitor and you can print out text, numeric, and other types of data.  Be sure to close the file when you're done writing to ensure the data is stored correctly!
 
Once the file is opened it's simply a matter of calling '''print''' and '''println''' functions on the file object to write data inside of it.  This is just like writing data to the serial monitor and you can print out text, numeric, and other types of data.  Be sure to close the file when you're done writing to ensure the data is stored correctly!
29 917

modifications

Menu de navigation