Modifications

Sauter à la navigation Sauter à la recherche
1 787 octets ajoutés ,  20 novembre 2015 à 13:17
Ligne 91 : Ligne 91 :     
{{ADFImage|ADAFRUIT-FONA-Arduino-Test-54.jpg}}
 
{{ADFImage|ADAFRUIT-FONA-Arduino-Test-54.jpg}}
 +
 +
== PWM/Buzzer ==
 +
There is a single PWM output pin that you can use to control a Piezo or a vibrating motor. The datasheet is a little unclear on how to use it in 'PWM' mode where you have full frequency and duty cycle control. In the mode we're using it, you can set the frequency from 1-2000 Hz and it will have 50% duty cycle. The '''PWM''' pin is the straight-from-the-module output, 2.8Vpp. The Buzzer pins have a PNP driver, so you can use it with a motor buzzer and power from the lipoly battery.
 +
 +
{{ADFImage|ADAFRUIT-FONA-Arduino-Test-55.jpg}}
 +
 +
== Faire un appel ==
 +
OK now we're onto the good stuff. You can make a phone call with FONA pretty easily. Make sure you have the right audio interface selected (external or headset!) before you go forward
 +
 +
Make a call with '''c''' - the call happens in the 'background'. When you're done then you can hang up with '''h'''
 +
 +
{{ADFImage|ADAFRUIT-FONA-Arduino-Test-56.jpg}}
 +
 +
== Envoyer et recevoir des SMS ==
 +
Another easy thing you can do is send and receive SMS messages. Lets start by sending an SMS. We'll use twitter's 40404 short code, which will auto respond, making it easy to verify both sending and receiving
 +
 +
You can send multi-line SMS's using the library API but for this example, its easier to parse the data if its a single line!
 +
 +
{{ADFImage|ADAFRUIT-FONA-Arduino-Test-57.jpg}}
 +
 +
You can then ask the SIM how many SMS's it has with '''N''' and read all of them with '''R'''
 +
 +
Note that SMS's are referred to by slots but the number does not include empty slots. We'll show this in detail in a bit
 +
 +
{{ADFImage|ADAFRUIT-FONA-Arduino-Test-58.jpg}}
 +
 +
You can read individual SMS's with '''r'''
 +
 +
{{ADFImage|ADAFRUIT-FONA-Arduino-Test-59.jpg}}
 +
 +
And delete SMS's by slot # with '''d'''
 +
 +
{{ADFImage|ADAFRUIT-FONA-Arduino-Test-60.jpg}}
     
29 836

modifications

Menu de navigation