Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
deleted 155 characters in body; edited title
Source Link
dda
  • 1.6k
  • 1
  • 12
  • 18

Readinf Reading SMS Using arduino UNOusing Arduino Uno and SIM800L and print on LCD  (16x2 alphanumeric) using serial connection NEED HELP

Well, I am making a device, which havehas to receive smsSMS and print the text using am LCD display. Now I have a code whichthat can receive smsSMS and store it into Stringa string variable using serial connection. Here is my code:

#include <LiquidCrystal.h> #include <SoftwareSerial.h> const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; //LCD pins LiquidCrystal lcd(rs, en, d4, d5, d6, d7); String Arsp, Grsp; SoftwareSerial gsm(6,7); // RX, TX   void setup()   { Serial.begin(9600); Serial.println("Testing GSM SIM800L"); gsm.begin(9600); gsm.println("AT");  //checking delay(1000); gsm.println("AT+CMGF=1"); //Set to Text mode delay(1000); gsm.println("AT+CNMI=1, 2, 0, 0, 0"); //Set to notification for new message, New message indication lcd.begin(16, 2); }   void loop()   { if(gsm.available())  {  //Check if GSM Send any data {  Grsp = gsm.readString();  //Read data received from SIM800L GSM Module lcd.clear();  //Clear LCD Screen lcd.setCursor(0,0);  //Set LCD cursor to First line, first row for(int i = 0; i<=100; i++)  {  //Print received string character by character   {    lcd.clear(); lcd.setCursor(0,0); lcd.print(Grsp);  //Print string which received from GSM (sms, sender, sms index, receive time, etc) lcd.print(" "); lcd.print(i);  //Print the string index delay(500);  } } } 

When my Arduino UNOUno is connected to PC and the Arduino serial monitor is already open, it prints correctly this text received from GSM

In this case i senI sent a message whchwith text was "0". When i When I disconnect the USB and connect my arduinoArduino Uno to 9V power supply and send the same message text it printprints:

inIn this case 40 is the index of the message which receivereceived. I I want to get the whole string აasas in the first case when the USB was connected. I

I using arduniArduino GND and 5V to power the SIM800L. What I am doing wrong? Is this due to incorrect serial connection or incorrect code error?

Readinf SMS Using arduino UNO and SIM800L and print on LCD(16x2 alphanumeric) using serial connection NEED HELP

Well, I making device, which have to receive sms and print the text using LCD display. Now I have a code which can receive sms and store it into String variable using serial connection. Here is my code:

#include <LiquidCrystal.h> #include <SoftwareSerial.h> const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; //LCD pins LiquidCrystal lcd(rs, en, d4, d5, d6, d7); String Arsp, Grsp; SoftwareSerial gsm(6,7); // RX, TX   void setup()  { Serial.begin(9600); Serial.println("Testing GSM SIM800L"); gsm.begin(9600); gsm.println("AT");  //checking delay(1000); gsm.println("AT+CMGF=1"); //Set to Text mode delay(1000); gsm.println("AT+CNMI=1,2,0,0,0"); //Set to notification for new message, New message indication lcd.begin(16, 2); }   void loop()  { if(gsm.available())  //Check if GSM Send any data {  Grsp = gsm.readString();  //Read data received from SIM800L GSM Module lcd.clear();  //Clear LCD Screen lcd.setCursor(0,0);  //Set LCD cursor to First line, first row for(int i = 0; i<=100; i++)  //Print received string character by character   {    lcd.clear(); lcd.setCursor(0,0); lcd.print(Grsp);  //Print string which received from GSM (sms, sender, sms index, receive time, etc) lcd.print(" "); lcd.print(i);  //Print the string index delay(500);  } } } 

When my Arduino UNO is connected to PC and Arduino serial monitor is already open, it prints correctly this text received from GSM

In this case i sen message whch text was "0". When i disconnect USB and connect my arduino Uno to 9V power supply and send the same message text it print

in this case 40 is the index of the message which receive. I want to get whole string აas in the first case when the USB was connected. I using arduni GND and 5V to power SIM800L. What I am doing wrong? Is this due to incorrect serial connection or incorrect code error?

Reading SMS using Arduino Uno and SIM800L and print on LCD  (16x2 alphanumeric) using serial connection NEED HELP

Well, I am making a device, which has to receive SMS and print the text using am LCD display. Now I have code that can receive SMS and store it into a string variable using serial connection. Here is my code:

#include <LiquidCrystal.h> #include <SoftwareSerial.h> const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; //LCD pins LiquidCrystal lcd(rs, en, d4, d5, d6, d7); String Arsp, Grsp; SoftwareSerial gsm(6,7); // RX, TX void setup() { Serial.begin(9600); Serial.println("Testing GSM SIM800L"); gsm.begin(9600); gsm.println("AT"); //checking delay(1000); gsm.println("AT+CMGF=1"); //Set to Text mode delay(1000); gsm.println("AT+CNMI=1, 2, 0, 0, 0"); //Set to notification for new message, New message indication lcd.begin(16, 2); } void loop() { if(gsm.available()) {  //Check if GSM Send any data Grsp = gsm.readString(); //Read data received from SIM800L GSM Module lcd.clear(); //Clear LCD Screen lcd.setCursor(0,0); //Set LCD cursor to First line, first row for(int i = 0; i<=100; i++) {  //Print received string character by character lcd.clear(); lcd.setCursor(0,0); lcd.print(Grsp); //Print string which received from GSM (sms, sender, sms index, receive time, etc) lcd.print(" "); lcd.print(i); //Print the string index delay(500); } } } 

When my Arduino Uno is connected to PC and the Arduino serial monitor is already open, it prints correctly this text received from GSM

In this case I sent a message with text "0". When I disconnect the USB and connect my Arduino Uno to 9V power supply and send the same message text it prints:

In this case 40 is the index of the message received. I want to get the whole string as in the first case when the USB was connected.

I using Arduino GND and 5V to power the SIM800L. What I am doing wrong? Is this due to incorrect serial connection or incorrect code error?

Source Link
AlexL
  • 11
  • 1
  • 1
  • 3

Readinf SMS Using arduino UNO and SIM800L and print on LCD(16x2 alphanumeric) using serial connection NEED HELP

Well, I making device, which have to receive sms and print the text using LCD display. Now I have a code which can receive sms and store it into String variable using serial connection. Here is my code:

#include <LiquidCrystal.h> #include <SoftwareSerial.h> const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; //LCD pins LiquidCrystal lcd(rs, en, d4, d5, d6, d7); String Arsp, Grsp; SoftwareSerial gsm(6,7); // RX, TX void setup() { Serial.begin(9600); Serial.println("Testing GSM SIM800L"); gsm.begin(9600); gsm.println("AT"); //checking delay(1000); gsm.println("AT+CMGF=1"); //Set to Text mode delay(1000); gsm.println("AT+CNMI=1,2,0,0,0"); //Set to notification for new message, New message indication lcd.begin(16, 2); } void loop() { if(gsm.available()) //Check if GSM Send any data { Grsp = gsm.readString(); //Read data received from SIM800L GSM Module lcd.clear(); //Clear LCD Screen lcd.setCursor(0,0); //Set LCD cursor to First line, first row for(int i = 0; i<=100; i++) //Print received string character by character { lcd.clear(); lcd.setCursor(0,0); lcd.print(Grsp); //Print string which received from GSM (sms, sender, sms index, receive time, etc) lcd.print(" "); lcd.print(i); //Print the string index delay(500); } } } 

When my Arduino UNO is connected to PC and Arduino serial monitor is already open, it prints correctly this text received from GSM

" +CMT: "+995599093230","","18/01/05,16:29:57+16" 0. 

In this case i sen message whch text was "0". When i disconnect USB and connect my arduino Uno to 9V power supply and send the same message text it print

" +CMTI: "ME", "+995598403536", 40)

in this case 40 is the index of the message which receive. I want to get whole string აas in the first case when the USB was connected. I using arduni GND and 5V to power SIM800L. What I am doing wrong? Is this due to incorrect serial connection or incorrect code error?