Created
September 10, 2013 12:36
-
-
Save rat/6508815 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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