I'm using the Arduino Uno board with Quectel M10 GPRS shield. I want to send AT commands through the serial monitor. I load the following code and send AT commands through the serial monitor. I dont see the AT command sent or response received on the serial monitor output window. Any help is appreciated..
/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());
}
Also, please correct the bogus comment in setup().
Recommended:
[url=http://www.theengineeringprojects.com/2017/01/use-arduino-serial-monitor.html]HOW TO USE ARDUINO SERIAL MONITOR