I am having no success trying to send AT commands to the modem and reading them in the serial monitor. I've borrowed from a number of different sketches I found online but none have worked. This is my latest attempt:
#include "Serial.h"
UART myUART0(PA_0, PI_9, NC, NC); //TX, RX, RTS, CTC NOTE: NC means not connected
UART myUART1(PA_9, PA_10, NC, NC);
UART myUART2(PG_14, PG_9, NC, NC);
UART myUART3(PJ_8, PJ_9, NC, NC);
void setup(){
myUART0.begin(115200);
myUART1.begin(115200);
};
void loop(){
if(myUART0.available()>0){
byte b=myUART0.read();
myUART1.write(b);
}
if(myUART1.available()>0){
byte b=myUART1.read();
myUART0.write(b);
}
};
I've tried different combinations of myUART"x" and myUART"y" but no matter what I try, I get nothing from the serial monitor. I cannot even get an echo to come back when I enter a command - so If I try "AT" + ENTER with new line and carriage return both selected, nothing shows up in the serial monitor, not even "AT".
Can anyone help a newb whose in way over his head?