SHARE
TWEET

call gsm

a guest Sep 13th, 2017 52 in 16 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <SoftwareSerial.h>
  2. SoftwareSerial mySerial(2,3);
  3. void setup()
  4. {
  5. mySerial.begin(19200);
  6. mySerial.println("\r");
  7. delay(1000);
  8. mySerial.println("AT+CMGF=1\r");
  9. delay(1000);
  10. }
  11. void loop()
  12. {
  13.   if (mySerial.available())
  14.     {
  15.     mySerial.println("ATD NUMERO;");      // numero a ser discado
  16.     delay(10000);                           //completar licação
  17.     delay(6000);                           //receber licação, esperar.
  18.     mySerial.println("ATH0");              //finaliza ligação
  19.     }
  20.     delay(10000);
  21.     delay(10000);
  22.     delay(10000);
  23.     delay(10000);
  24. }
RAW Paste Data
Top