Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include <Arduino.h>
  2.  
  3. String command = "";
  4. void setup() {
  5.   Serial.begin(9600);
  6.   Serial.println("Type AT commands!");
  7. }
  8.  
  9. void loop(){
  10.   if (Serial.available()) {
  11.     while(Serial.available()) { command += (char)Serial.read();delay(10); }
  12.     Serial.println(command);
  13.     command = ""; // No repeats
  14.   }
  15.   if (Serial.available()){ delay(20); Serial.write(Serial.read()); }
  16. }