Arduino Mega 2560 + BT Shield

Is anyone can help me ? I don’t understand why i cant change my arduino name , baud rate , etc…


  1. First of all , I installed my Arduino Mega ADK with a Mega shield and i installed the bluetooth shield on it.
  2. After, I connected with wire the TxD0 to Rx3 and RxD0 to Tx3.
  3. I plugged the arduino USB to my PC , (windows named it COM3)
  4. I detected bluetooth and install it with the binary code ‘1234’
  5. COM4 and COM5 are reconized by my pc and now they are the port for the bluetooth.
  6. I downloaded software serial library and bluetooth library
  7. I tried this slave code on arduino.exe 1.0.x :



    [list]
  8. /

    BluetoothShield Demo Code Slave.pde. This sketch could be used with

    Master.pde to establish connection between two Arduino. It can also

    be used for one slave bluetooth connected by the device(PC/Smart Phone)

    with bluetooth function.

    2011 Copyright © Seeed Technology Inc. All right reserved.



    Author: Steve Chang



    This demo code is free software; you can redistribute it and/or

    modify it under the terms of the GNU Lesser General Public

    License as published by the Free Software Foundation; either

    version 2.1 of the License, or (at your option) any later version.



    This library is distributed in the hope that it will be useful,

    but WITHOUT ANY WARRANTY; without even the implied warranty of

    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

    Lesser General Public License for more details.



    You should have received a copy of the GNU Lesser General Public

    License along with this library; if not, write to the Free Software

    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA



    For more details about the product please check http://www.seeedstudio.com/depot/



    /





    /
    Upload this sketch into Seeeduino and press reset
    /



    #include <SoftwareSerial.h> //Software Serial Port

    #define RxD

    #define TxD 0





    #define DEBUG_ENABLED 1



    SoftwareSerial blueToothSerial(RxD,TxD);



    void setup()

    {

    Serial.begin(9600);

    Serial3.begin(38400);

    pinMode(RxD, INPUT);

    pinMode(TxD, OUTPUT);

    setupBlueToothConnection();



    }



    void loop()

    {

    char recvChar;

    while(1){

    if(Serial3.available()){//check if there’s any data sent from the remote bluetooth shield

    recvChar = Serial3.read();

    Serial.print(recvChar);

    }

    if(Serial.available()){//check if there’s any data sent from the local serial terminal, you can add the other applications here

    recvChar = Serial.read();

    Serial3.print(recvChar);

    }

    }

    }



    void setupBlueToothConnection()

    {

    Serial3.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400

    Serial3.print("\r\n+STWMOD=0\r\n"); //set the bluetooth work in slave mode

    Serial3.print("\r\n+STNA=SeeedBTSlave\r\n"); //set the bluetooth name as “SeeedBTSlave”

    Serial3.print("\r\n+STOAUT=1\r\n"); // Permit Paired device to connect me

    Serial3.print("\r\n+STAUTO=0\r\n"); // Auto-connection should be forbidden here

    Serial.print(“PassChanged”);

    delay(2000); // This delay is required.

    Serial3.print("\r\n+INQ=1\r\n"); //make the slave bluetooth inquirable

    Serial.println(“The slave bluetooth is inquirable!”);

    delay(2000); // This delay is required.

    Serial3.flush();

    }
  9. [/list]


  10. Then , I pressed « RESET » button.


  11. I dont understand why it dont work (im a programming college students and i didnt know where i am wrong, i’m entirely new with electronic systems)


  12. Here is a picture of the settings of my card.



    Sorry for my bad english and thanks for advance