Difference between revisions of "Quad-band GPRS/GSM Shield for Arduino Mega"

From LinkSprite Playgound
Jump to: navigation, search
(How to buy)
(Hardware Installation)
Line 55: Line 55:
 
=== Hardware Installation  ===
 
=== Hardware Installation  ===
  
 +
==== Tutorial 1 ====
  
 +
Jumpers position:
  
 +
J1: 5100RX to TX1
  
 +
J2: 5100TX to RX1
 +
 +
Pass through code:
 +
 +
#include        //Used for string manipulations
 +
 +
char incoming_char=0;      //Will hold the incoming character from the Serial Port.
 +
 +
void setup()
 +
 +
{
 +
 +
  //Initialize serial ports for communication.
 +
 +
Serial.begin(9600);
 +
 +
Serial1.begin(9600);
 +
 +
Serial.println("Starting SM5100B Communication...");
 +
 +
}
 +
 +
void loop()
 +
 +
{
 +
 +
//If a character comes in from the cellular module...
 +
 +
if(Serial1.available() >0)
 +
 +
{
 +
 +
incoming_char=Serial1.read();    //Get the character from the cellular serial port.
 +
 +
Serial.print(incoming_char);  //Print the incoming character to the terminal.
 +
 +
}
 +
 +
//If a character is coming from the terminal to the Arduino...
 +
 +
if(Serial.available() >0)
 +
 +
{
 +
 +
incoming_char=Serial.read();  //Get the character coming from the terminal
 +
 +
Serial1.print(incoming_char);    //Send the character to the cellular module.
 +
 +
}
 +
 +
}
  
 
=== Programming  ===
 
=== Programming  ===

Revision as of 08:33, 13 December 2012

Introduction

Model:ARDUI_MEGA_5100_GPRS

ARDUI MEGA 5100 GPRS.jpg

Features

Application Ideas

Cautions

Schematic

Specification

Pin definition and Rating

Mechanic Dimensions

Usage

Hardware Installation

Tutorial 1

Jumpers position:

J1: 5100RX to TX1

J2: 5100TX to RX1

Pass through code:

  1. include //Used for string manipulations

char incoming_char=0; //Will hold the incoming character from the Serial Port.

void setup()

{

 //Initialize serial ports for communication.

Serial.begin(9600);

Serial1.begin(9600);

Serial.println("Starting SM5100B Communication...");

}

void loop()

{

//If a character comes in from the cellular module...

if(Serial1.available() >0)

{

incoming_char=Serial1.read(); //Get the character from the cellular serial port.

Serial.print(incoming_char); //Print the incoming character to the terminal.

}

//If a character is coming from the terminal to the Arduino...

if(Serial.available() >0)

{

incoming_char=Serial.read(); //Get the character coming from the terminal

Serial1.print(incoming_char); //Send the character to the cellular module.

}

}

Programming

FAQ

Please list your question here:

Support

If you have questions or other better design ideas, you can go to our forum to discuss or creat a ticket for your issue at linksprite support.

Resources

How to buy

Here to buy Quad-band GPRS/GSM Shield for Arduino MegaARDUI_MEGA_5100_GPRS on LinkSprite Cart

See Also

Other related products and resources.

Licensing

This documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 Source code and libraries are licensed under GPL/LGPL, see source code files for details.