Professional Documents
Culture Documents
www.bitstoc.com
FEATURES:
SPECIFICATION:
WWW.BITSTOC.COM
BitStoc Electronics
Page 1
TOP
BOTTOM
BLOCK DESCRIPTION:
Power Select Switch - select power source as External Power Jack or Arduino board
External Power Jack - connect external power source (5V - 7.5 Vdc)
Antenna Jack - insert the included antenna
Serial Port Selector - jumper to choose between Hardware or Software Serial configuration
Hardware Serial - D0/D1 port of Arduino
Software serial - D7/D8 port of Arduino
LED indicators - NetLight: Blinks every 3 seconds if it is connected to the cellphone network
Status: indicates if SIM900 is powered ON/OFF
Power Button & LED: manual button switch to turn ON/OFF SIM900 chip and
LED to indicate if the GSM Shield circuitry is ON/OFF.
SIM Card Holder - placement for the SIM Card.
WWW.BITSTOC.COM
BitStoc Electronics
Page 2
WWW.BITSTOC.COM
BitStoc Electronics
Page 3
3. Put the Power Select Switch to the outside corner of the PCB board (not on the Xduino side). To
allow Uploading of the Arduino Sketch Code.
4. Insert the GSM Shield (in correct position) to the Arduino board and Connect the Arduino board
to the computer using your USB A to B programming cable.
WWW.BITSTOC.COM
BitStoc Electronics
Page 4
C.) Make sure the comment line // is aligned to the code line.
After checking the above list, Compile and Upload the code to the Arduino board. A ready to
upload code is also available in the Sample Arduino Code folder.
6. After successful uploading of Code, slide the switch back to Xduino side and the Green LED on
the shield will light up.
7. Then press and hold the Power Button switch for 2 to 3 seconds and release it to turn on the
SIM900 shield. You will notice the Status and Net Light will light up.
8. Wait for about 5 to 10 seconds and the green Net Light should blink every after 3 seconds which
means that the GSM Shield and SIM Card is now connected to the network, otherwise if the
Net Light blinks every 1 second it is still trying to connect to the network.
(Note: If the green Net Light only blinks every 1 second after a long time (ex. 2 minutes), go back
to the first step and double check that you follow correctly the steps. Also try to check that the
SIM Card is working and properly inserted.)
WWW.BITSTOC.COM
BitStoc Electronics
Page 5
9. If the Net Light blinks every 3 seconds, your GSM shield and Arduino board is now connected to
the network. Wait for a while your SMS message will appear on the recipient cellular phone.
(Congratulations!!!)
WWW.BITSTOC.COM
BitStoc Electronics
Page 6
void sendSMS()
{
SIM900.print("AT+CMGF=1\r");
// AT command to SMS mode to text
delay(100);
SIM900.println("AT + CMGS = \"+639331247932\"");
// Change this to your desired recipient mobile
number. (international format)
delay(100);
SIM900.println("Hello! World. Success! This is a text message from an Arduino Uno.");
// Message
to send
delay(100);
SIM900.println((char)26);
// End AT command with a ^Z, ASCII code 26
delay(100);
SIM900.println();
delay(5000);
// give module time to send SMS
}
void loop()
{
sendSMS();
do {} while (1);
}
WWW.BITSTOC.COM
BitStoc Electronics
Page 7
RECEIVING Text Message Code (and Display received data on the Serial Monitor)
/*
Arduino Sketch Code for RECEIVING SMS.
Created
by tronixstuff
Modified
by BitStoc for GSM Shield SMS Example
*/
#include <SoftwareSerial.h>
SoftwareSerial SIM900(7, 8);
char incoming_char=0;
void setup()
{
Serial.begin(19200);
SIM900.begin(19200);
delay(20000);
connect to the network
SIM900.print("AT+CMGF=1\r");
// set SMS mode to text
delay(100);
SIM900.print("AT+CNMI=2,2,0,0,0\r"); // Configuration to extract content of the received message.
Display it on Arduino Serial Monitor
delay(100);
}
void loop()
{
// Now we simply display any text that the GSM shield sends out on the serial monitor
if(SIM900.available() >0)
{
incoming_char=SIM900.read();
//Get the character from the cellular serial port.
Serial.print(incoming_char);
//Print the incoming character to the Arduino Serial Monitor.
}
}
WWW.BITSTOC.COM
BitStoc Electronics
Page 8