Différences entre versions de « Bluefruit-LE-Shield-BLEUart »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
(Page créée avec « {{Bluefruit-LE-Shield-NAV}} {{traduction}} == Croquis BLEUart == The '''BLEUart''' example sketch allows you to send and receive text data between the Arduino and a conn... »)
 
Ligne 35 : Ligne 35 :
 
You can see the incoming string here in the Adafruit Bluefruit LE Connect app below (iOS in this case):
 
You can see the incoming string here in the Adafruit Bluefruit LE Connect app below (iOS in this case):
  
{{ADFImage|Bluefruit-LE-Shield-BLEUart-12.png}}
+
{{ADFImage|Bluefruit-LE-Shield-BLEUart-12.png|480px}}
  
 
The response text ('Why hello, Arduino!') can be seen below:
 
The response text ('Why hello, Arduino!') can be seen below:

Version du 21 mai 2017 à 16:10


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.

Croquis BLEUart

The BLEUart example sketch allows you to send and receive text data between the Arduino and a connected Bluetooth Low Energy Central device on the other end (such as you mobile phone using the Adafruit Bluefruit LE Connect application for Android or iOS in UART mode).

Ouvrir le croquis

To open the ATCommand sketch, click on the File > Examples > Adafruit_BluefruitLE_nRF51 folder in the Arduino IDE and select bleuart_cmdmode:

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

This will open up a new instance of the example in the IDE, as shown below:

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

Configuration

Check the Configuration! page earlier to set up the sketch for Software/Hardware UART or Software/Hardware SPI. The default is hardware SPI

If using software or hardware Serial UART:

  • This tutorial does not need to use the MODE pin, make sure you have the mode switch in CMD mode if you do not configure & connect a MODE pin
  • Don't forget to also connect the CTS pin on the Bluefruit to ground if you are not using it! (The Flora has this already done)

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:

{{{2}}}
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:

{{{2}}}
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):

Bluefruit-LE-Shield-BLEUart-12.png
Crédit: AdaFruit Industries www.adafruit.com

The response text ('Why hello, Arduino!') can be seen below:

{{{2}}}
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