Hi guy
I'm trying to communicate with the Ai Thinker A7 module. On Arduino Uno R3 Im using pin 7,pin 8 to connect with UTXD & UAXD. When i send sms from my phone to module thinker 7, i use arduino to read SMS.
My code as bellow
#include <SoftwareSerial.h>
#include <string.h>
char incoming_char = 0;
SoftwareSerial cell(7, 8); //my shield uses these pins for software serial.
void setup()
{
Serial.begin(115200);
cell.begin(115200);
delay(2000);
Serial.print("Starting modem communication...");
delay(12000);
Serial.print("OK\nIntroduce your AT commands:\n");
}
void loop()
{
if(cell.available() > 0)
{
incoming_char=cell.read();
if(incoming_char=="a"){
Serial.println("Content of SMS is a"); //If the SMS contains "#" the arduino looks for commands that follow.
Serial.println(incoming_char);
}
else
{
Serial.println("Difference a");
Serial.println(incoming_char);
}
}
}
But i can't read sms when my phone send sms. I check on Serial Monitor. Result same picture attached as bellow
Please help me fix it. Thanks a lot