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

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 20 : Ligne 20 :
  
 
== Installer Adafruit SAMD ==
 
== Installer Adafruit SAMD ==
Next you can install the Adafruit SAMD package to add the board file definitions
+
Ensuite, vous pouvez installer les paquets "Adafruit SAMD" pour ajouter la définition des cartes Adafruit
  
You can type '''Adafruit SAMD''' in the top search bar, then when you see the entry, click '''Install'''
+
Vous pouvez saisir '''Adafruit SAMD''' dans la zone de recherche puis cliquer sur le bouton '''Installer''' lorsque vous avez localisé l'entrée dans la liste.
  
 
{{ADFImage|FEATHER-M0-ArduinoIDE-Utiliser-03.png|640px}}
 
{{ADFImage|FEATHER-M0-ArduinoIDE-Utiliser-03.png|640px}}
  
Even though in theory you don't need to - I recommend rebooting the IDE
+
Même si cela n'est pas nécessaire en théorie, nous recommandons de redémarrer l'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.
+
'''Quittez et réouvez Arduino IDE''' pour vous assurer que toutes les cartes sont correctement installées. Vous devriez être capable de sélectionner de nouvelles cartes (et téléverser du code) vers les nouvelles cartes accessible dans le menu '''Outils -> Carte''' (''Tools -> Board'').
  
 
Select the matching board, the current options are:
 
Select the matching board, the current options are:

Version du 28 octobre 2017 à 16:45


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.

Introduction

Les plateformes Feather/Metro/Gemma/Trinket M0 utilise une puce ATSAMD21 cadencé à 48 MHz. Vous pouvez facilement les faire fonctionner en utilisant Arduino IDE. La plupart des bibliothèques (incluant les populaires NeoPixels et bibliothèques d'affichage) fonctionnerons avec le M0, plus spécialement les périphériques et senseurs utilisant les bus I2C et SPI.

Maintenant que nous avons ajouté les URLs appropriés dans les préférences d'Arduino IDE (voir page précédente), nous pouvons ouvrir le Gestionnaire de cartes (dit Boards Manager en anglais) via le point de menu Outils -> Carte (Tools->Board).

FEATHER-M0-ArduinoIDE-Utiliser-01.png
Crédit: AdaFruit Industries www.adafruit.com

Une fois le gestionnaire de carte ouvert, cliquez sur la liste déroulante (en haut à gauche) pour sélectionner les cartes des contributeurs (dit Contributed en anglais). Vous serez alors capable d'installer les cartes supportés les URLs ajoutés dans l'écran des préférences.

Installer le support SAMD

Pour commencer, il faut installer les cartes Arduino SAMD version 1.6.15 ou plus récent.

Vous pouvez saisir Arduino SAMD dans la barre de recherche, puis cliquer sur Installer lorsque vous voyez l'entrée adequate.

FEATHER-M0-ArduinoIDE-Utiliser-02.png
Crédit: AdaFruit Industries www.adafruit.com

Installer Adafruit SAMD

Ensuite, vous pouvez installer les paquets "Adafruit SAMD" pour ajouter la définition des cartes Adafruit

Vous pouvez saisir Adafruit SAMD dans la zone de recherche puis cliquer sur le bouton Installer lorsque vous avez localisé l'entrée dans la liste.

FEATHER-M0-ArduinoIDE-Utiliser-03.png
Crédit: AdaFruit Industries www.adafruit.com

Même si cela n'est pas nécessaire en théorie, nous recommandons de redémarrer l'IDE

Quittez et réouvez Arduino IDE pour vous assurer que toutes les cartes sont correctement installées. Vous devriez être capable de sélectionner de nouvelles cartes (et téléverser du code) vers les nouvelles cartes accessible dans le menu Outils -> Carte (Tools -> Board).

Select the matching board, the current options are:


  • Feather M0 (for use with any Feather M0 other than the Express)
  • Feather M0 Express
  • Metro M0 Express
  • Circuit Playground Express
  • Gemma M0
  • Trinket M0

FEATHER-M0-ArduinoIDE-Utiliser-04.png
Crédit: AdaFruit Industries www.adafruit.com

Install Drivers (Windows 7 Only)

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

Click below to download our Driver Installer


Download-icon.pngDownload Adafruit Driver Installer v2.0.0.0

Download and run the installer

FEATHER-M0-ArduinoIDE-Utiliser-05.png
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

FEATHER-M0-ArduinoIDE-Utiliser-06.png
Crédit: AdaFruit Industries www.adafruit.com

Select which drivers you want to install, the defaults will set you up with just about every Adafruit board!

FEATHER-M0-ArduinoIDE-Utiliser-07.png
Crédit: AdaFruit Industries www.adafruit.com

Click Install to do the installin'

FEATHER-M0-ArduinoIDE-Utiliser-08.png
Crédit: AdaFruit Industries www.adafruit.com

Blink

Now you can upload your first blink sketch!

Plug in the Gemma M0, Trinket M0, Metro M0 or 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 Trinket/Gemma/Metro/Feather M0!

FEATHER-M0-ArduinoIDE-Utiliser-09.png
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.


Sucessful Upload

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

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

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

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

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.

FEATHER-M0-ArduinoIDE-Utiliser-12.png
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.

Ubuntu & Linux Issue Fix

Note if you're using Ubuntu 15.04 (or perhaps other more recent Linux distributions) there is an issue with the modem manager service which causes the Bluefruit LE micro to be difficult to program.  If you run into errors like "device or resource busy", "bad file descriptor", or "port is busy" when attempting to program then <a href="https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/1473246">you are hitting this issue.</a>

The fix for this issue is to make sure Adafruit's custom udev rules are applied to your system.  One of these rules is made to configure modem manager not to touch the Feather board and will fix the programming difficulty issue.  Follow the steps for installing Adafruit's udev rules on this page.


Source: Adafruit Feather M0 Express - Designed for CircuitPython créé par LadyAda, Tony DiCola, Scorr Shawcroft, Dan Halbert pour AdaFruit Industries. Crédit 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.