Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SoftwareSerial.h>
- SoftwareSerial sim900(10,11);
- void setup()
- {
- Serial.begin(19200);
- sim900.begin(19200);
- delay(2000);
- Serial.print(" sim800 ready...");
- delay(1000);
- }
- void loop()
- {
- sim900.println("AT+CMGF=1");
- delay(500);
- sim900.println("AT+CMGS="+91xxxxxxxxxx"");
- delay(500);
- sim900.println("hello");
- delay(100);
- Serial.println(sim900.read()); //this line is throwing the above message (-1, continuously) on the serial monitor
- sim900.println((char)26);
- delay(1000);
- }
Add Comment
Please, Sign In to add comment