Hi All! Been trying to connect my 1 bluetooth module as slave and other as master.
Everything works great until i get to the AT Commands... AT Test command works, with an "OK" but all other commands come back with the same error.
I been at this for 2 days now researching and trying to get it working, so im kinda lost now lol i've tried with Arduino Nano, anddd an Arduino Uno R3. Same results for both and i have tried the separate HC-05 module (I have 2)
I'll buy you a cookie if you can help! <3
Light comes on for 2 seconds stays off for 2. And i've changed the pins between 8 and 9 as suggested from other tutorials i've seen
#include <SoftwareSerial.h>
SoftwareSerial BTserial(2, 3); // RX | TX
const long baudRate = 38400;
char c=' ';
boolean NL = true;
void setup()
{
Serial.begin(9600);
Serial.print("Sketch: "); Serial.println(__FILE__);
Serial.print("Uploaded: "); Serial.println(__DATE__);
Serial.println(" ");
BTserial.begin(baudRate);
Serial.print("BTserial started at "); Serial.println(baudRate);
Serial.println(" ");
}
void loop()
{
// Read from the Bluetooth module and send to the Arduino Serial Monitor
if (BTserial.available())
{
c = BTserial.read();
Serial.write(c);
}
// Read from the Serial Monitor and send to the Bluetooth module
if (Serial.available())
{
c = Serial.read();
BTserial.write(c);
// Echo the user input to the main window. The ">" character indicates the user entered text.
if (NL) { Serial.print(">"); NL = false; }
Serial.write(c);
if (c==10) { NL = true; }
}
}
//SERIAL MONITOR//
>AT
>AT
OK
>AT+CMODE?
ERROR:(0)
>AT+CMODE?
ERROR:(0)
>AT+CMODE?
ERROR:(0)
>AT+CMODE?
ERROR:(0)