Arduino Mega 2560 + BT Shield

Following from my previous comment, still haven’t had any luck with Android sending data to Arduino (Arduino can send fine to Android). Is it possible something could be interfering, such as wifi? I’m wondering if my 802.11g/n router could be causing any interference…

I bought a BT module and tried to connect with the arduino Mega 2560, but the device isn’t appearing in the pc and the android. some one can help me? I did all step in the wiki and in this forum. Will it with problem?



Thanks!

Had the same problem with the Leonardo. Use Serial1 instead of Serial3 and use jumpers for port 0 and 1.



(Took me awhile to find this post. Something for the Wiki ?)

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





Sorry i had to wait 24 hours before post the picture.

Hello!



I’m using a seeeduino bluetooth shield (http://www.seeedstudio.com/wiki/Bluetooth_Shield) with my arduino uno REV 3 to connect with a master bluetooth device wich has a predeterminated (“12345678”) pairing code. But after trying to connect and to input the pairing code from my arduino I realised that this shield use only 4 digit ( “1234” ) pairing code ??? Is this true or I’m wrong ? ( I tryed to connect from my cell phone and if I set a “12345678” as pairing code it does not connect, with a “1234” pairing code it does )

Is there anyway to change or update the shield’s firmware?



Thank you!

hey , the firmware was uploaded by default setting , we can’t modify it.

Can confirm this is the same for the Leonardo.



To receive on the board you will need to use PCINT pins (see (dubdubdubdot) adafruit (dot) com/blog/2012/06/03/arduino-leonardo-pinout-reference/)



I swapped pin 6 in the example for pin 8 with the hack shown below.



Can a mod please change the title of this sticky to include the Leonardo? I’ve already changed the wiki to point Leonardo users this way. Also if you could modify this post to include the link as I can’t post it as it appears it’s too spamy sigh