Différences entre versions de « ADAFRUIT-FONA-Arduino-Test »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 76 : Ligne 76 :
 
{{ADFImage|ADAFRUIT-FONA-Arduino-Test-52.jpg}}
 
{{ADFImage|ADAFRUIT-FONA-Arduino-Test-52.jpg}}
  
== Headset & Audio externe ==
+
== Casque Audio et Audio externe ==
 
There are two audio paths on the FONA. One is the headset, thru the 3.5mm audio jack. The other is "external" - using the two speaker and mic pins for wiring up external speaker and mic. FM audio, phone calls, tones, etc can be routed to one or the other.
 
There are two audio paths on the FONA. One is the headset, thru the 3.5mm audio jack. The other is "external" - using the two speaker and mic pins for wiring up external speaker and mic. FM audio, phone calls, tones, etc can be routed to one or the other.
 
* To set the audio to headset, use the command '''H'''
 
* To set the audio to headset, use the command '''H'''

Version du 20 novembre 2015 à 13:11


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.

Préambule

Télécharger Adafruit_FONA

To begin reading sensor data, you will need to télécharger la bibliothèque Adafruit_FONA depuis le dépôt github. You can do that by visiting the github repo and manually downloading or, easier, just click this button to download the zip

Download-icon.pngTéléchargez la bibliothèque Adafruit_FONA

Rename the uncompressed folder Adafruit_FONA and check that the Adafruit_FONA folder contains Adafruit_FONA.cpp et Adafruit_FONA.h

Place the Adafruit_FONA library folder your arduinosketchfolder/libraries/ folder.

You may need to create the libraries subfolder if its your first library. Restart the IDE.

Nous disposons d'un tutoriel pour l'installation de bibliothèque si vous avez besoin d'un petit coup de main.

Charger la démo

Open up File->Examples->Adafruit_FONA->FONAtest and upload to your Arduino wired up to the module.

For Mega, Leonardo, or Micro, change the definition of FONA_TX to the pin you used!

ADAFRUIT-FONA-Arduino-Test-10.png
Crédit: AdaFruit Industries www.adafruit.com

Make sure you have a charged 3.7/4.2V LiPoly or LiIon battery plugged into the JST and an antenna attached

ADAFRUIT-FONA-Arduino-Test-11.jpg
Crédit: AdaFruit Industries www.adafruit.com

ADAFRUIT-FONA-Asm-20.jpg
Crédit: AdaFruit Industries www.adafruit.com

Once uploaded to your Arduino, open up the serial console au débit de 115200 bauds to begin the tester sketch

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

Make sure you also have Both NL & CR for the serial command sender option. This means when you send data to the Arduino via the console, it will put a newline/return at the end.

Utiliser ce Croquis

The test sketch has a menu interface so you can test out just about everything the FONA can do. The menu may change slightly as we add more functionality and update code!

Tension de l'accu

Lets begin by reading the battery voltage. That's the lipoly battery. This is handy if you need to track when the battery is low! type b into the command window et presser le bouton Send (envoi)

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

You'll see a print-out of the battery voltage in mV, so in this case its 3.726V

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

Vérifier le CCID de la carte SIM

You can verify that the SIM is inserted and correct by reading the CCID, which is the unique identifier printed on it with C.

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

Vérifier le RSSI (force du signal)

You can ask the FONA for the signal strength with the command i. The reply is a number, but you can convert it to dBm. Try to have the signal strength higher than 5 in order to make calls, SMSs, etc. In this case, I've got a 10

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

Vérifier l'enregistrement réseau

If the FONA has good signal it will immediately try to locate a cell tower and register to it.

You can check the status of the network with n

Once it's Home Registered, give it like 5-10 more seconds before trying to access/send SMS's or phone calls.

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

Volume audio

You can set the audio volume with v and retrieve it with V - its in % so ranges from 0 to 100

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

Casque Audio et Audio externe

There are two audio paths on the FONA. One is the headset, thru the 3.5mm audio jack. The other is "external" - using the two speaker and mic pins for wiring up external speaker and mic. FM audio, phone calls, tones, etc can be routed to one or the other.

  • To set the audio to headset, use the command H
  • To set the audio to external, use the command e

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

Jouer des sons

You can test the audio path with the toolkit tones. These are tones that mimic what some phone services sound like. For a full list of tones, you can check the AT+STTONE command in the AT command datasheet. We'll use tone #20 which is the American dial tone.

You can switch to headset mode, play a tone, then try it on the external audio mode. This is a very easy way to try out both speakers for debugging

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


https://learn.adafruit.com/adafruit-fona-mini-gsm-gprs-cellular-phone-module/arduino-test#checking-network-registration


Source: Adafruit FONA - Call phones, send and receive SMSs, & more! All with FONA. Ecrit par Lady Ada pour AdaFruit. 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.