Skip to content

Instantly share code, notes, and snippets.

@rat
Created September 10, 2013 12:36
Show Gist options
  • Save rat/6508815 to your computer and use it in GitHub Desktop.
Save rat/6508815 to your computer and use it in GitHub Desktop.
//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 <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);
void setup()
{
mySerial.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the GPRS baud rate
}
void loop()
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment