#include SoftwareSerial mySerial(4,5); // RX, TX char outputs[50]; int i; void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); Serial.println("Started"); // set the data rate for the SoftwareSerial port mySerial.begin(9600); mySerial.println("AT+CMGR=5"); } void loop() // run over and over { if (mySerial.available()) Serial.write(mySerial.read()); if (Serial.available()>0) { for (i=0; i<51; i++) outputs[i] = Serial.read(); } for (i=0; i<51; i++) Serial.println(outputs[i]); }