Modifications

Sauter à la navigation Sauter à la recherche
Ligne 19 : Ligne 19 :  
Ces exemples vous permettent de formater la mémoire flash avec un système de fichier FAT (la même type de système de fichier que l'on retrouve sur une carte SD), lire et écrire des fichiers comme ont le fait sur une carte SD.
 
Ces exemples vous permettent de formater la mémoire flash avec un système de fichier FAT (la même type de système de fichier que l'on retrouve sur une carte SD), lire et écrire des fichiers comme ont le fait sur une carte SD.
   −
== Read & Write CircuitPython Files ==
+
== Lire et écrire des fichiers CircuitPython ==
The '''fatfs_circuitpython''' example shows how to read and write files on the flash chip so that they're accessible from CircuitPython.  This means you can run a CircuitPython program on your board and have it store data, then run an Arduino sketch that uses this library to interact with the same data.
+
L'exemple '''fatfs_circuitpython''' montre comment lire et écrire des fichiers sur la mémoire flash de sorte qu'ils puissent être accéssible depuis CircuitPython/MicroPython.  Cela signifie que vous pouvez exécuter un programme CircuitPython sur votre carte pour y stocker des données, puis utiliser un croquis Arduino qui utilise cette bibliothèque pour interagir avec ces mêmes données.
   −
Note that before you use the '''fatfs_circuitpython''' example you '''must''' have loaded CircuitPython on your board. <a href="../../../../adafruit-feather-m0-express-designed-for-circuit-python-circuitpython/circuitpython">Load the latest version of CircuitPython as explained in this guide</a> first to ensure a CircuitPython filesystem is initialized and written to the flash chip.  Once you've loaded CircuitPython then you can run the '''fatfs_circuitpython''' example sketch.
+
Notez qu'avant d'utiliser l'exemple '''fatfs_circuitpython''' vous '''devez''' avoir chargé CircuitPython sur votre carte. <a href="../../../../adafruit-feather-m0-express-designed-for-circuit-python-circuitpython/circuitpython">Load the latest version of CircuitPython as explained in this guide</a> first to ensure a CircuitPython filesystem is initialized and written to the flash chip.  Once you've loaded CircuitPython then you can run the '''fatfs_circuitpython''' example sketch.
    
To run the sketch load it in the Arduino IDE and upload it to the Feather M0 board.  Then open the serial monitor at 115200 baud.  You should see the serial monitor display messages as it attempts to read files and write to a file on the flash chip.  Specifically the example will look for a '''boot.py''' and '''main.py''' file (like what CircuitPython runs when it starts) and print out their contents.  Then it will add a line to the end of a '''data.txt''' file on the board (creating it if it doesn't exist already).  After running the sketch you can reload CircuitPython on the board and open the '''data.txt''' file to read it from CircuitPython!
 
To run the sketch load it in the Arduino IDE and upload it to the Feather M0 board.  Then open the serial monitor at 115200 baud.  You should see the serial monitor display messages as it attempts to read files and write to a file on the flash chip.  Specifically the example will look for a '''boot.py''' and '''main.py''' file (like what CircuitPython runs when it starts) and print out their contents.  Then it will add a line to the end of a '''data.txt''' file on the board (creating it if it doesn't exist already).  After running the sketch you can reload CircuitPython on the board and open the '''data.txt''' file to read it from CircuitPython!
29 917

modifications

Menu de navigation