I have recently started working with the Arduino Pro Mini 5v/16Mhz and an AT 09 BLE module for an IoT project. I am controlling the BLE module using Software Serial and am leaving the hardware serial for for my laptop. I am using an app called "Serial Bluetooth Terminal" on Android to send/receive messages. The BLE module is able to receive messages and the "AT" command is also working. But when I try to get the BLE module to send a message, I get no response in the app. Any idea why this is happening and how can I resolve it?
My connections are:
Laptop -> Arduino UNO, MB-102(USB to breadboard power adapter)
Arduino UNO(without IC) Rx -> Pro mini Tx0
Arduino UNO(without IC) Tx -> Pro mini Rx1
Arduino UNO(without IC) RESET -> Pro mini Rst
MB-102 5V -> Pro Mini Pin RAW
MB-102 GND -> Pro Mini Pin GND
Pro Mini Pin 2 -> AT 09 TXD
Pro Mini Pin 3 -> AT 09 RXD
Pro Mini Pin VCC -> AT 09 VCC
Pro Mini Pin GND -> AT 09 GND
This is my code:
#include<SoftwareSerial.h>
SoftwareSerial ble(2, 3);
int statePin = 4;
char c;
void setup()
{
Serial.begin(9600);
ble.begin(9600);
ble.print("AT\r\n");
delay(100);
while(!ble.available())
Serial.print(".");
while(ble.available())
{
Serial.print(char(ble.read()));
}
}
void loop()
{
while(ble.available() > 0)
{
c = char(ble.read());
delay(10);
Serial.print(c);
ble.print(c);
}
}
This is the first time I am posting here so please tell me if I missed out on any information.