Guest User

Untitled

a guest
Oct 16th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. void resposta() {
  2. while (SIM800L.available())
  3. {
  4. if (SIM800L.available() > 0)
  5. {
  6. Serial.write(SIM800L.read());
  7. }
  8. }
  9. }
  10.  
  11.  
  12. String retorno() {
  13. char resposta[500] = "";
  14. int cont = 0;
  15. int pos = 0;
  16. while ((pos < 500) && (String(resposta).indexOf("OK") == -1) && (cont < 2000));
  17. {
  18. if (SIM800L.available() > 0)
  19. {
  20. resposta[pos] = SIM800L.read();
  21. pos++;
  22. }
  23. cont ++;
  24. delay(10);
  25. }
  26. return String(resposta);
  27. }
Add Comment
Please, Sign In to add comment