the code I used to test the newsoftserial is given on the wiki page and given below:
//Serial Relay - Arduino will patch a
//serial link between the computer and the GPRS Shield
//at 19200 bps 8-N-1
//Computer is connected to Hardware UART
//GPRS Shield is connected to the Software UART
#include <NewSoftSerial.h>
NewSoftSerial mySerial(7, 8);
void setup()
{
mySerial.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the GPRS baud rate
}
void loop()
{
if(Serial.available())
{
mySerial.print((unsigned char)Serial.read());
}
else if(mySerial.available())
{
Serial.print((unsigned char)mySerial.read());
}
}
the hardware uart code I used is given below:
void setup()
{
Serial.begin(19200); //Default serial port setting for the GPRS modem is 19200bps 8-N-1
Serial.print("\r");
delay(1000); //Wait for a second while the modem sends an "OK"
Serial.print("AT+CMGF=1\r"); //Because we want to send the SMS in text mode
delay(1000);
//Serial.print("AT+CSCA=\"+919032055002\"\r"); //Setting for the SMS Message center number,
//delay(1000); //uncomment only if required and replace with
//the message center number obtained from
//your GSM service provider.
//Note that when specifying a tring of characters
// " is entered as \"
Serial.print("AT+CMGS=\"+918446043032\"\r"); //Start accepting the text for the message
//to be sent to the number specified.
//Replace this number with the target mobile number.
delay(1000);
Serial.print("SIM900 and Arduino say Hi!\r"); //The text for the message
delay(1000);
Serial.print(26,BYTE); //Equivalent to sending Ctrl+Z
}
void loop()
{
//We just want to send the SMS only once, so there is nothing in this loop.
//If we put the code for SMS here, it will be sent again and again and cost us a lot.
}
[/size]