vivek7497

GSM module SIM 800 A

Nov 1st, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <SoftwareSerial.h>
  2.  
  3. SoftwareSerial sim900(10,11);
  4.  
  5. void setup()
  6. {
  7.   Serial.begin(19200);
  8.   sim900.begin(19200);
  9.   delay(2000);
  10.   Serial.print(" sim800 ready...");
  11.   delay(1000);
  12. }
  13.  
  14. void loop()
  15. {
  16. sim900.println("AT+CMGF=1");
  17. delay(500);
  18. sim900.println("AT+CMGS="+91xxxxxxxxxx"");
  19. delay(500);
  20. sim900.println("hello");
  21. delay(100);
  22. Serial.println(sim900.read()); //this line is throwing the above message (-1, continuously) on the serial monitor
  23. sim900.println((char)26);
  24. delay(1000);
  25. }
Add Comment
Please, Sign In to add comment