void setup() Serial.begin(9600); bt.begin(9600); // Match BL12-A3 default baud Serial.println("BL12-A3 ready");
Always verify your vendor’s datasheet, as pin assignments and command sets may vary slightly between manufacturers. When in doubt, start with the factory default 9600 baud and use a USB-to-TTL adapter to test the module independently before integrating it into a larger system. End of write-up. bl12-a3 bluetooth
void loop() if (bt.available()) Serial.write(bt.read()); void setup() Serial
if (Serial.available()) bt.write(Serial.read()); void setup() Serial.begin(9600)
Common AT commands (entered after sending +++ with guard times before and after):