GSM MODULE Arduino

View previous topic View next topic Go down

GSM MODULE Arduino

Post by jamied_uk on 6th August 2017, 17:00

GSM MODULE


http://www.davidjwatts.com/youtube/sim800l.ino
https://youtu.be/XqoeqG2j-ik






SIM800L V2.0 5V Wireless GSM GPRS MODULE Quad-Band W/ Antenna Cable Cap



Pin Out:

Arduino Mega
~~~~~~~~~~~~~~~~~~~~

Pin 10  RX  SIM_RX0
Pin 11  TX  SIM_TX0
Pin 7   Button 1 ()


Arduino Uno (Second Example)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Pin 2  TX  SIM_TX0
Pin 3  RX  SIM_RX0
Pin 7  Button 1 ()



~~~~~~~~~

5v in
gnd
analogue signal out


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Below change 795******* to you're number (without the 1st +44 or 0)



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Code:
#include <SoftwareSerial.h>
#include <String.h>
String lat = "52.6272690";
String lng = "-1.1526180";
SoftwareSerial sim800l(10, 11); // RX, TX
float sensorValue;
const int buttonPin = 7;
int buttonState = 0;
float tempC;
float tempCavg;
int avgcount = 0;
void setup()
{
 
  pinMode(buttonPin, INPUT);
  sim800l.begin(9600);
  Serial.begin(9600);  
  delay(500);
}
 
void loop()
{
 

  buttonState = digitalRead(buttonPin);
 
  if (buttonState == 0) {
    while(avgcount < 50){
    sensorValue = analogRead(A0);
    tempC = sensorValue * 5.0;
    tempC = tempC / 1024.0;
    tempC = (tempC - 0.05) * 100;
    tempCavg = tempCavg + tempC;
    avgcount++;
    }
    delay(300);
    Serial.println(tempCavg/ 50);
    tempCavg = tempCavg / 50;
    SendTextMessage();

 }
 
  if (sim800l.available()){
    Serial.write(sim800l.read());
  }
}
 
void SendTextMessage()
{
  Serial.println("Sending Text...");
  sim800l.print("AT+CMGF=1\r"); // Set the shield to SMS mode
  delay(100);
 
  sim800l.print("AT+CMGS=\"+44795*******\"\r"); 
  delay(200);
//  sim800l.print("http://maps.google.com/?q=");
//  sim800l.print(lat);
//  sim800l.print(",");
//  sim800l.print(lng);
  sim800l.print("The temperature is: ");
  sim800l.print(tempCavg);
  sim800l.print(" degrees C");
  sim800l.print("\r"); //the content of the message
  delay(500);
  sim800l.print((char)26);//the ASCII code of the ctrl+z is 26 (required according to the datasheet)
  delay(100);
  sim800l.println();
  Serial.println("Text Sent.");
   delay(500);
    tempCavg = 0;
    avgcount = 0;
}
 
void DialVoiceCall()
{
  sim800l.println("ATD+4479********;");//dial the number, must include country code
  delay(100);
  sim800l.println();
}


Last edited by jamied_uk on 6th August 2017, 17:27; edited 1 time in total
avatar
jamied_uk
Admin

Posts : 2268
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: GSM MODULE Arduino

Post by jamied_uk on 6th August 2017, 17:16

More Examples:

avatar
jamied_uk
Admin

Posts : 2268
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: GSM MODULE Arduino

Post by jamied_uk on 6th August 2017, 17:19

avatar
jamied_uk
Admin

Posts : 2268
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: GSM MODULE Arduino

Post by jamied_uk on 6th August 2017, 17:29

Example 3

avatar
jamied_uk
Admin

Posts : 2268
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: GSM MODULE Arduino

Post by jamied_uk on 6th August 2017, 17:29

AP Commands

espruino.com/datasheets/SIM900_AT.pdf


TUT for sms
smssolutions.net/tutorials/gsm

Example Sketches
iforce2d.net/sketches




More GPRS / GSM

https://www.youtube.com/watch?v=-okAX7ZoGDk
https://www.youtube.com/watch?v=CeStrH-5Llo

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tracking gprs / gms

https://youtu.be/CeStrH-5Llo

http://www.instructables.com/id/Make-Your-Own-GPS-SMS-Security-Tracking-System/


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Now search Youtube for ESP 8266 Node MCU and GSM module

youtube.com/results?search_query=esp+8266+Wireless+GSM+GPRS+MODULE+Quad-Band
avatar
jamied_uk
Admin

Posts : 2268
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: GSM MODULE Arduino

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum