Hi everyone, I need some help
I just paired my 2 bluetooth modules. My HC 05 is connected to the Arduino Nano while my HC 06 is connected to the Arduino Mega. I tried to run the sketch below to test the status of the HC 06. The HC 06 module is connected to a 16×2 LCD display.
unfortunately, the HC 06 module status is “inactive”
how could I make this "active"?
thank you in advance
#include
#include
#define rxPin 18
#define txPin 19
#define lcd1 30
#define lcd2 31
#define lcd3 32
#define lcd4 33
#define lcd5 34
#define lcd6 35
SoftwareSerial master(rxPin,txPin);
LiquidCrystal lcd(7,8,9,10,11,12);
void setup() {
Serial.begin(9600);
lcd.begin(16,2);
master.begin(9600);
}
void loop() {
master.listen();
if(master.isListening()){
lcd.setCursor(0,0);
lcd.print(“Slave BT Status”);
lcd.setCursor(0,1);
lcd.print(“ACTIVE”);
}
else{
lcd.setCursor(0,0);
lcd.print(“Slave BT Status”);
lcd.setCursor(0,1);
lcd.print(“INACTIVE”);
}
}