Différences entre versions de « FEATHER-M0-Utiliser-Arduino-IDE »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 8 : Ligne 8 :
 
Now that you have added the appropriate URLs to the Arduino IDE preferences, you can open the '''Boards Manager''' (gestionnaire de carte) by navigating to the '''Tools->Board''' menu.
 
Now that you have added the appropriate URLs to the Arduino IDE preferences, you can open the '''Boards Manager''' (gestionnaire de carte) by navigating to the '''Tools->Board''' menu.
  
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-00.jpg|640px}}
+
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-00.png|640px}}
  
 
Once the Board Manager opens, click on the category drop down menu on the top left hand side of the window and select '''Contributed'''. You will then be able to select and install the boards supplied by the URLs added to the prefrences.  
 
Once the Board Manager opens, click on the category drop down menu on the top left hand side of the window and select '''Contributed'''. You will then be able to select and install the boards supplied by the URLs added to the prefrences.  
Ligne 16 : Ligne 16 :
 
First up, install the '''Arduino SAMD Boards''' version '''1.6.2''' or later
 
First up, install the '''Arduino SAMD Boards''' version '''1.6.2''' or later
  
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-10.jpg|640px}}
+
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-10.png|640px}}
  
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-11.jpg|640px}}
+
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-11.png|640px}}
  
 
== Installer le support SAMD Adafruit SAMD ==
 
== Installer le support SAMD Adafruit SAMD ==
 
Next you can install the Adafruit SAMD package to add the board file definitions
 
Next you can install the Adafruit SAMD package to add the board file definitions
  
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-20.jpg|640px}}
+
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-20.png|640px}}
  
 
Even though in theory you don't need to - I recommend rebooting the IDE
 
Even though in theory you don't need to - I recommend rebooting the IDE
Ligne 29 : Ligne 29 :
 
'''Quit and reopen the Arduino IDE''' to ensure that all of the boards are properly installed. You should now be able to select and upload to the new boards listed in the '''Tools->Board''' menu.
 
'''Quit and reopen the Arduino IDE''' to ensure that all of the boards are properly installed. You should now be able to select and upload to the new boards listed in the '''Tools->Board''' menu.
  
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-21.jpg|640px}}
+
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-21.png|640px}}
  
 
== Installation des pilotes Windows ==
 
== Installation des pilotes Windows ==
Ligne 38 : Ligne 38 :
 
{{download-box|Téléchargez l'installeur pilote Adafruit|https://github.com/adafruit/Adafruit_Windows_Drivers/releases/download/1.0.0.0/adafruit_drivers.exe}}
 
{{download-box|Téléchargez l'installeur pilote Adafruit|https://github.com/adafruit/Adafruit_Windows_Drivers/releases/download/1.0.0.0/adafruit_drivers.exe}}
  
 +
Download and run the installer
  
 +
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-30.png}}
 +
 +
Run the installer! Since we bundle the SiLabs and FTDI drivers as well, you'll need to click through the license
 +
 +
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-31.png}}
 +
 +
Select which drivers you want to install:
 +
 +
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-32.png}}
 +
 +
Click Install to do the installin'
 +
 +
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-33.png}}
 +
 +
== Le programme Blink ==
 +
Now you can upload your first blink sketch!
 +
 +
Plug in the Feather M0 and wait for it to be recognized by the OS (just takes a few seconds). It will create a serial/COM port, you can now select it from the dropdown, it'll even be 'indicated' as Feather M0!
 +
 +
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-40.png}}
 +
 +
Now load up the Blink example
 +
 +
<nowiki>// the setup function runs once when you press reset or power the board
 +
void setup() {
 +
  // initialize digital pin 13 as an output.
 +
  pinMode(13, OUTPUT);
 +
}
 +
 +
// the loop function runs over and over again forever
 +
void loop() {
 +
  digitalWrite(13, HIGH);  // turn the LED on (HIGH is the voltage level)
 +
  delay(1000);              // wait for a second
 +
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
 +
  delay(1000);              // wait for a second
 +
}</nowiki>
 +
 +
And click upload! That's it, you will be able to see the LED blink rate change as you adapt the delay() calls.
 +
 +
== Téléversé avec succès ==
 +
If you have a successful upload, you'll get a bunch of red text that tells you that the device was found and it was programmed, verified & reset
 +
 +
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-50.png}}
 +
 +
== Problème de compilation ==
 +
Compilation Issues
 +
 +
If you get an alert that looks like
 +
 +
'''Cannot run program "{runtime.tools.arm-none-eabi-gcc.path}\bin\arm-non-eabi-g++"'''
 +
 +
Make sure you have installed the Arduino SAMD boards package, you need both Arduino & Adafruit SAMD board packages
 +
 +
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-60.png}}
 +
 +
== Boot manuel ==
 +
Manually bootloading
 +
 +
If you ever get in a 'weird' spot with the bootloader, or you have uploaded code that crashes and doesn't auto-reboot into the bootloader, click the '''RST''' button '''twice'''' (like a double-click)to get back into the bootloader.
 +
 +
'''The red LED will pulse, so you know that its in bootloader mode'''.
 +
 +
Once it is in bootloader mode, you can select the newly created COM/Serial port and re-try uploading.
 +
 +
{{ADFImage|FEATHER-M0-Utiliser-Arduino-IDE-70.png}}
 +
 +
You may need to go back and reselect the 'normal' USB serial port next time you want to use the normal upload.
  
 
{{FEATHER-M0-TRAILER}}
 
{{FEATHER-M0-TRAILER}}

Version du 25 avril 2016 à 20:49


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Utiliser Arduino IDE

Since the Feather M0 uses an ATSAMD21 chip running at 48 MHz, you can pretty easily get it working with the Arduino IDE. Most libraries (including the popular ones like NeoPixels and display) will work with the M0, especially devices & sensors that use i2c or SPI.

Now that you have added the appropriate URLs to the Arduino IDE preferences, you can open the Boards Manager (gestionnaire de carte) by navigating to the Tools->Board menu.

FEATHER-M0-Utiliser-Arduino-IDE-00.png
Crédit: AdaFruit Industries www.adafruit.com

Once the Board Manager opens, click on the category drop down menu on the top left hand side of the window and select Contributed. You will then be able to select and install the boards supplied by the URLs added to the prefrences.

Installer le support SAMD

First up, install the Arduino SAMD Boards version 1.6.2 or later

FEATHER-M0-Utiliser-Arduino-IDE-10.png
Crédit: AdaFruit Industries www.adafruit.com

FEATHER-M0-Utiliser-Arduino-IDE-11.png
Crédit: AdaFruit Industries www.adafruit.com

Installer le support SAMD Adafruit SAMD

Next you can install the Adafruit SAMD package to add the board file definitions

FEATHER-M0-Utiliser-Arduino-IDE-20.png
Crédit: AdaFruit Industries www.adafruit.com

Even though in theory you don't need to - I recommend rebooting the IDE

Quit and reopen the Arduino IDE to ensure that all of the boards are properly installed. You should now be able to select and upload to the new boards listed in the Tools->Board menu.

FEATHER-M0-Utiliser-Arduino-IDE-21.png
Crédit: AdaFruit Industries www.adafruit.com

Installation des pilotes Windows

When you plug in the Feather, you'll need to possibly install a driver

Click below to download our Driver Intstaller:

Download-icon.pngTéléchargez l'installeur pilote Adafruit

Download and run the installer

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

Run the installer! Since we bundle the SiLabs and FTDI drivers as well, you'll need to click through the license

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

Select which drivers you want to install:

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

Click Install to do the installin'

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

Le programme Blink

Now you can upload your first blink sketch!

Plug in the Feather M0 and wait for it to be recognized by the OS (just takes a few seconds). It will create a serial/COM port, you can now select it from the dropdown, it'll even be 'indicated' as Feather M0!

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

Now load up the Blink example

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}

And click upload! That's it, you will be able to see the LED blink rate change as you adapt the delay() calls.

Téléversé avec succès

If you have a successful upload, you'll get a bunch of red text that tells you that the device was found and it was programmed, verified & reset

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

Problème de compilation

Compilation Issues

If you get an alert that looks like

Cannot run program "{runtime.tools.arm-none-eabi-gcc.path}\bin\arm-non-eabi-g++"

Make sure you have installed the Arduino SAMD boards package, you need both Arduino & Adafruit SAMD board packages

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

Boot manuel

Manually bootloading

If you ever get in a 'weird' spot with the bootloader, or you have uploaded code that crashes and doesn't auto-reboot into the bootloader, click the RST button twice' (like a double-click)to get back into the bootloader.

The red LED will pulse, so you know that its in bootloader mode.

Once it is in bootloader mode, you can select the newly created COM/Serial port and re-try uploading.

{{{2}}}
Crédit: AdaFruit Industries www.adafruit.com

You may need to go back and reselect the 'normal' USB serial port next time you want to use the normal upload.


Source: Adafruit Feather M0 Basic Proto créé par LadyAda pour AdaFruit Industries. Crédit [www.adafruit.com AdaFruit Industries]

Traduit par Meurisse D. pour MCHobby.be

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.