GSM SIM900 Shield w/ Quad-Band GSM
-
RM185.00
- Product Code: GSM-SIM900-Shield
- Availability: In Stock
The GPRS Shield is based on SIM900 module from SIMCOM and compatible with Arduino and its clones. The GPRS Shield provides you a way to communicate using the GSM cell phone network. The shield allows you to achieve SMS, MMS, GPRS and Audio via UART by sending AT commands (GSM 07.07 ,07.05 and SIMCOM enhanced AT Commands). The shield also has the 12 GPIOs, 2 PWMs and an ADC of the SIM900 module(They are all 2V8 logic) present onboard.
Applications
Features
Package Included
GPRS/GSM SIM900 Shield Development Board x 1
Note:
- Make sure your SIM card is unlocked.
- The product is provided as is without an insulating enclosure. Please observe ESD precautions specially in dry (low humidity) weather.
- The SIM900 card model used does not include pins to directly mount on the ARDUINO, you may link it manually since it is controlled by UART and only need TX and RX.
Tutorial from: http://www.prometec.net/gprs-llamar-enviar-sms/
We will introduce the card PIN to unlock it using AT commands and we will give you some time to connect to the network. The command that we will use is AT + CPIN = "XXXX " , where we will replace XXXX by the PIN of our card.
#include <SoftwareSerial.h> SoftwareSerial SIM900 (7, 8); // 10 and 11 for the Arduino Mega. Configure the serial port for the SIM900. Void setup () { // digitalWrite (9, HIGH); // Uncomment to activate the card power by Software // delay (1000); // digitalWrite (9, LOW); Delay (5000); // We give ourselves some time to turn on the GPRS and power the card SIM900.begin (19200); // Set serial port speed for SIM900 Serial.begin (19200); // Set Arduino serial port speed Serial.println ("OK"); Delay (1000); SIM900.println ("AT + CPIN = \" XXXX \ ""); // AT command to enter the PIN of the card Delay (25000); // Time to find a NETWORK } Void call () { Serial.println ("Calling ..."); SIM900.println ("ATDXXXXXXXXX;"); // AT command to make a call Delay (30000); // Wait 30 seconds while making the call SIM900.println ("ATH"); // Call dangle Delay (1000); Serial.println ("Call completed"); } Void loop () { to call(); // Make the call While (1); }
The programming to send an SMS will be identical, but we will create another function that will be in charge of sending the commands AT to send the SMS.
First we will use the AT + CMGF = 1 \ r command to tell the GPRS module that we are going to send a message, and then enter the number to which it is addressed with the command AT + CMGS = "XXXXXXXXX" .
Once this is done, we simply send the content of the message and end it with the ^ Z character. The function would look like this:
Void message_sms () { Serial.println ("Sending SMS ..."); SIM900.print ("AT + CMGF = 1 \ r"); // Set the text mode to send or receive messages Delay (1000); SIM900.println ("AT + CMGS = \" XXXXXXXXX \ ""); // Number to which the message will be sent Delay (1000); SIM900.println ("SMS sent from an Arduino. Greetings from Prometec."); // SMS Text Delay (100); SIM900.println ((char) 26); // End command ^ Z Delay (100); SIM900.println (); Delay (5000); // We wait for some time to send the SMS Serial.println ("Sent SMS"); }
Tags: GSM