Go Down

Topic: Mega (1280 and 2560) and Parani Bluetooth (Read 855 times) previous topic - next topic


I can't seem for the life of me to be able to communicate using the Mega to my Parani Bluetooth module to send AT commands to set it out Mode 0.

Parani 110 Userguide: http://www.ece.unb.ca/Courses/ECE4333/CPD/DataSheets/ParaniEsdUserGuide.pdf

Bluetooth Adapter board: http://www.ece.unb.ca/Courses/ECE4333/CPD/DataSheets/BluetoothAdapterBoardSchematic.pdf
Note I am connecting through at the TTL area, connecting Pin 10 to GND, Pin 9 (Bluetooth TxD) to RX3, and Pin 8 (Bluetooth RxD) to TX3.
Also note that the board automatically drops the voltage from the arduino 5V to the 3.3V as well as the fact it provides a voltage divider for the Bluetooth RxD as to allow it to see a max of 3.3V

I also know that the Bluetooth Adapter Board as well as the Parani Bluetooth devices work as they have been tested using an mbed board with very similar code and works fine there.

Here's my code, hopefully someone will know what I'm doing wrong or at least guide me in the right direction

Code: [Select]
//start program
void setup()
  Serial.begin(9600); //pc
  Serial3.begin(9600); //BT
void loop()
  char m, r;

  if (Serial.available() >0){
    m = Serial.read();
    Serial.write(m); //echo input
  if (Serial3.available() >0){
    r = Serial3.read();
    Serial.write("HERE"); //Let me know it can at least read/get to the bluetooth serial
}  //end program

Go Up