Modifications

Sauter à la navigation Sauter à la recherche
Ligne 65 : Ligne 65 :  
{{ADFImage|FEATHER-M0-MicroPython-bibliotheque-06.png|640px}}
 
{{ADFImage|FEATHER-M0-MicroPython-bibliotheque-06.png|640px}}
   −
<h2>
+
=== Non-Express boards - Out of space? ===
<a href="#non-express-boards-out-of-space" class="anchor-link"><span class="fa fa-link"></span></a><span id="non-express-boards-out-of-space" class="anchor-link-target"></span>Non-Express boards - Out of space?</h2>
   
The file system on the board is very tiny. (Smaller than an ancient floppy disk.) So, its likely you'll run out of space but don't panic! There are a couple ways to free up space.
 
The file system on the board is very tiny. (Smaller than an ancient floppy disk.) So, its likely you'll run out of space but don't panic! There are a couple ways to free up space.
   Ligne 77 : Ligne 76 :  
One unique feature of Python is that the indentation of code matters. Usually the recommendation is to indent code with four spaces for every indent. In general, we recommend that too. '''However''', one trick to storing more human-readable code is to use a single tab character for indentation. This approach uses 1/4 of the space for indentation and can be significant when we're counting bytes.
 
One unique feature of Python is that the indentation of code matters. Usually the recommendation is to indent code with four spaces for every indent. In general, we recommend that too. '''However''', one trick to storing more human-readable code is to use a single tab character for indentation. This approach uses 1/4 of the space for indentation and can be significant when we're counting bytes.
   −
<h3>Mac OSX loves to add extra files.</h3>
+
==== Mac OSX loves to add extra files. ====
 
{{ADFImage|FEATHER-M0-MicroPython-bibliotheque-07.png|640px}}
 
{{ADFImage|FEATHER-M0-MicroPython-bibliotheque-07.png|640px}}
   Ligne 109 : Ligne 108 :  
However there are still some cases where hidden files will be created by Mac OSX.  In particular if you copy a file that was downloaded from the internet it will have special metadata that Mac OSX stores as a hidden file.  Luckily you can run a copy command from the terminal to copy files '''without''' this hidden metadata file.  See the steps below:
 
However there are still some cases where hidden files will be created by Mac OSX.  In particular if you copy a file that was downloaded from the internet it will have special metadata that Mac OSX stores as a hidden file.  Luckily you can run a copy command from the terminal to copy files '''without''' this hidden metadata file.  See the steps below:
   −
<h3>Copy Files on Mac OSX Without Creating Hidden Files</h3>
+
==== Copy Files on Mac OSX Without Creating Hidden Files ====
 
Once you've disabled and removed hidden files with the above commands on Mac OSX you need to be careful to copy files to the board with a special command that prevents future hidden files from being created.  Unfortunately you '''cannot''' use drag and drop copy in Finder because it will still create these hidden extended attribute files in some cases (for files downloaded from the internet, like Adafruit's modules).
 
Once you've disabled and removed hidden files with the above commands on Mac OSX you need to be careful to copy files to the board with a special command that prevents future hidden files from being created.  Unfortunately you '''cannot''' use drag and drop copy in Finder because it will still create these hidden extended attribute files in some cases (for files downloaded from the internet, like Adafruit's modules).
    
To copy a file or folder use the '''-X''' option for the '''cp''' command in a terminal.  For example to copy a '''foo.mpy''' file to the board use a command like:
 
To copy a file or folder use the '''-X''' option for the '''cp''' command in a terminal.  For example to copy a '''foo.mpy''' file to the board use a command like:
   −
<syntaxhighlight lang="python">
+
<syntaxhighlight lang="bash">
 
cp -X foo.mpy /Volumes/CIRCUITPY</pre>
 
cp -X foo.mpy /Volumes/CIRCUITPY</pre>
 
</syntaxhighlight>
 
</syntaxhighlight>
Ligne 123 : Ligne 122 :  
Or to copy a folder and all of its child files/folders use a command like:
 
Or to copy a folder and all of its child files/folders use a command like:
   −
<syntaxhighlight lang="python">
+
<syntaxhighlight lang="bash">
 
cp -rX folder_to_copy /Volumes/CIRCUITPY</pre>
 
cp -rX folder_to_copy /Volumes/CIRCUITPY</pre>
 
</syntaxhighlight>
 
</syntaxhighlight>
   −
<syntaxhighlight lang="python">
+
====Other Mac OSX Tips====
</syntaxhighlight>
  −
 
  −
<h3>Other Mac OSX Tips</h3>
   
If you'd like to see the amount of space used on the drive and manually delete hidden files here's how to do so.  First list the amount of space used on the '''CIRCUITPY''' drive with the df command:
 
If you'd like to see the amount of space used on the drive and manually delete hidden files here's how to do so.  First list the amount of space used on the '''CIRCUITPY''' drive with the df command:
    
{{ADFImage|FEATHER-M0-MicroPython-bibliotheque-08.png|640px}}
 
{{ADFImage|FEATHER-M0-MicroPython-bibliotheque-08.png|640px}}
   −
Lets remove the <code class="prettyprint">._</code> files first.
+
Lets remove the {{fname|._}} files first.
    
{{ADFImage|FEATHER-M0-MicroPython-bibliotheque-09.png|640px}}
 
{{ADFImage|FEATHER-M0-MicroPython-bibliotheque-09.png|640px}}
Ligne 141 : Ligne 137 :  
Whoa! We have 13Ki more than before! Lets continue!
 
Whoa! We have 13Ki more than before! Lets continue!
   −
<h2>
+
=== Continuing after copy ===
<a href="#continuing-after-copy" class="anchor-link"><span class="fa fa-link"></span></a><span id="continuing-after-copy" class="anchor-link-target"></span>Continuing after copy</h2>
   
Woohoo! Everything copied over just fine. Lets check the serial terminal to see how things are going.
 
Woohoo! Everything copied over just fine. Lets check the serial terminal to see how things are going.
  
29 917

modifications

Menu de navigation