Advertisement
Guest User

GSMShieldSoftwareSerial.ino

a guest
Oct 23rd, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. //Serial Relay – Arduino will patch a
  2. //serial link between the computer and the GPRS Shield
  3. //at 19200 bps 8-N-1
  4. //Computer is connected to Hardware UART
  5. //GPRS Shield is connected to the Software UART
  6.  
  7. #include <SoftwareSerial.h>
  8.  
  9. SoftwareSerial mySerial(7,8);
  10.  
  11. void setup()
  12. {
  13. Serial.begin(19200);
  14. //Serial.println(“Begin”);
  15. mySerial.begin(19200);
  16.  
  17. }
  18.  
  19. void loop()
  20. {
  21. if (mySerial.available())
  22. Serial.write(mySerial.read());
  23. if (Serial.available())
  24. mySerial.write(Serial.read());
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement