Bluefruit-LE-Shield-BLEUart
En cours de traduction/élaboration. |
Croquis BLEUart
L'exemple BLEUart permet d'échanger des données texte (envoi et réception) entre un Arduino et un périphérique Bluetooth Low Energy connecté à l'autre bout (comme un téléphone mobile utilisant l'application Adafruit Bluefruit LE Connect pour Android ou iOS. Le transfert se fait en mode UART).
Ouvrir le croquis
Pour ouvrir le croquis ATCommand, cliquez sur le menu Fichiers > Exemples > Adafruit_BluefruitLE_nRF51 dans Arduino IDE puis sélectionnez bleuart_cmdmode:
Crédit: AdaFruit Industries www.adafruit.com
Cela ouvrira l'exemple dans l'environnement de développement, comme visible ci-dessous:
Crédit: AdaFruit Industries www.adafruit.com
Configuration
Vérifiez la page Configuration présenter plus tôt dans le tutoriel! Il est important de configurer le croquis pour utiliser soit l'UART Logiciel/Matériel, soit le bus SPI Logiciel/Matériel correspondant à votre plateforme. Par défaut, le croquis utilise le bus SPI matériel
Si vous utilisez le port série/UART logiciel ou matériel:
- Ce tutoriel ne requière pas l'utilisation de la broche MODE, assurez-vous d'avoir l'interrupteur en position CMD si vous ne configurer pas (et ne connectez pas) la broche MODE.
- N'oubliez pas de connecter la broche CTS sur la masse/GND du Bluefruit si vous n'utilisez pas le signal CTS! (Le Flora l'a déjà branché à la masse)
Exécuter le croquis
Once you upload the sketch to your board (via the arrow-shaped upload icon), and the upload process has finished, open up the Serial Monitor via Tools > Serial Monitor, and make sure that the baud rate in the lower right-hand corner is set to 115200:
Crédit: AdaFruit Industries www.adafruit.com
Once you see the request, use the App to connect to the Bluefruit LE module in UART mode so you get the text box on your phone
Any text that you type in the box at the top of the Serial Monitor will be sent to the connected phone, and any data sent from the phone will be displayed in the serial monitor:
Crédit: AdaFruit Industries www.adafruit.com
You can see the incoming string here in the Adafruit Bluefruit LE Connect app below (iOS in this case):
Crédit: AdaFruit Industries www.adafruit.com
The response text ('Why hello, Arduino!') can be seen below:
Crédit: AdaFruit Industries www.adafruit.com
Basé sur "Bluefruit LE Shield" d'Adafruit Industries, écrit par
Kevin Townsend - Traduit en Français par shop.mchobby.be CC-BY-SA pour la traduction
Toute copie doit contenir ce crédit, lien vers cette page et la section "crédit de traduction".
Based on "Bluefruit LE Shield" from Adafruit Industries, written by
Kevin Townsend - Translated to French by shop.mchobby.be CC-BY-SA for the translation
Copies must includes this credit, link to this page and the section "crédit de traduction" (translation credit).
Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com