/*Bluetooth Module MEGA2560 RXD TXD1(pin18) TXD RXD1(pin19) VCC 5V GND GND */ void setup() { //define 2 serial port Serial.begin(9600); Serial1.begin(9600); } void loop() { char c; //the IDE send,phone receive if (Serial.available()) { c = Serial.read(); Serial1.print(c); } //the phone send ,IDE receive if (Serial1.available()) { c = Serial1.read(); Serial.println(c); } }