Intercommunication between Two Microduino-BT Modules
From Microduino Wiki
The default is the soft serial port (D4, D5). Here we introduce the connection method of the default serial port. If you want to change jumpers, you need to change program of the serial port correspondingly. Note: Baud rate should be below 38400.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(4, 5); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
}
void loop() // run over and over
{
if(Serial.available())
{
mySerial.write(Serial.read());
}
if(mySerial.available())
{
Serial.write(mySerial.read());
}
} Note: After connection, AT instruction doesn’t work. |