Guest User

Arduino AT Commands script

a guest
Feb 5th, 2017
157
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <SoftwareSerial.h>
  2.  
  3. SoftwareSerial mySerial(10, 11); // RX, TX
  4.  
  5. void setup() {
  6.   Serial.begin(9600);
  7.   Serial.println("Enter AT commands:");
  8.   mySerial.begin(38400);
  9. }
  10.  
  11. void loop()
  12. {
  13.   if (mySerial.available())
  14.     Serial.write(mySerial.read());
  15.  
  16.   if (Serial.available())
  17.     mySerial.write(Serial.read());
  18. }
RAW Paste Data