Forum >Arduino 1280 controller with a bluetooth or wifi shield
ArduinoGeneral

Arduino 1280 controller with a bluetooth or wifi shield

userHead LeSanglier 2013-01-08 14:26:02 11889 Views19 Replies
Hi,

I would like to connect an Arduino 1280 controller with a bluetooth or wifi shield, what is the good method to connect them ?

Thank you ! :D
2013-03-19 01:27:16 Hi maro,

1. Please choose ""Prog" to upload sketch
2. Choose "RUN" and "XBee" to run all.
3. Choose "RUN" and "USB". It's just used to config the Xbee module via USB and xbee shield directly. It means drive the xbee module via USB to TTL embeded on the Arduino processor.

Hope it's clear now. ;)

Best
Lauren
userHeadPic Lauren
2013-03-19 01:27:16 Hi maro,

1. Please choose ""Prog" to upload sketch
2. Choose "RUN" and "XBee" to run all.
3. Choose "RUN" and "USB". It's just used to config the Xbee module via USB and xbee shield directly. It means drive the xbee module via USB to TTL embeded on the Arduino processor.

Hope it's clear now. ;)

Best
Lauren
userHeadPic Lauren
2013-03-19 01:13:20 Dear LeSanglier ,
i have same question as you ...
you have an answer ?!

userHeadPic maro
2013-03-19 01:13:20 Dear LeSanglier ,
i have same question as you ...
you have an answer ?!

userHeadPic maro
2013-01-18 01:27:05 I will try all your advices tonight.

My last questions :
So in my case (Arduino (connected to pc with usb) + Xbee Shield + Xbee Bluetooth) :
-  I choose "Prog" switch (regardless the USB and Xbee Switch ) to upload the sketch ?
and
- I choose "RUN" and "XBEE" to run all ?
userHeadPic LeSanglier
2013-01-18 01:27:05 I will try all your advices tonight.

My last questions :
So in my case (Arduino (connected to pc with usb) + Xbee Shield + Xbee Bluetooth) :
-  I choose "Prog" switch (regardless the USB and Xbee Switch ) to upload the sketch ?
and
- I choose "RUN" and "XBEE" to run all ?
userHeadPic LeSanglier
2013-01-18 01:24:04 ;D

1. No.
For programming the xbee, choose USB & RUN.
For programming the Arduino, choose PROG.
For driving xbee using Arduino, choose Xbee&RUN.

Seems that the description is still not good. So I improve it again and again and .....=-= Haha Hope my description and picture drawing will be better slowly.

2. I didn't the application you using now. I can't understand the reason....I used the cellbots application which includes a sound control,virtual joystick,and etc.
[url=https://play.google.com/store/apps/details?id=com.cellbots&feature=nav_result#?t=W251bGwsMSwyLDNd]https://play.google.com/store/apps/details?id=com.cellbots&feature=nav_result#?t=W251bGwsMSwyLDNd [/url]
And for configuring the bluetooth bee setting like device name and pair code, please take a look at the datasheet also.
[url=https://www.dfrobot.com/image/data/TEL0026/TEL0026_Datasheet.pdf]https://www.dfrobot.com/image/data/TEL0026/TEL0026_Datasheet.pdf[/url]
userHeadPic Lauren
2013-01-18 01:24:04 ;D

1. No.
For programming the xbee, choose USB & RUN.
For programming the Arduino, choose PROG.
For driving xbee using Arduino, choose Xbee&RUN.

Seems that the description is still not good. So I improve it again and again and .....=-= Haha Hope my description and picture drawing will be better slowly.

2. I didn't the application you using now. I can't understand the reason....I used the cellbots application which includes a sound control,virtual joystick,and etc.
[url=https://play.google.com/store/apps/details?id=com.cellbots&feature=nav_result#?t=W251bGwsMSwyLDNd]https://play.google.com/store/apps/details?id=com.cellbots&feature=nav_result#?t=W251bGwsMSwyLDNd [/url]
And for configuring the bluetooth bee setting like device name and pair code, please take a look at the datasheet also.
[url=https://www.dfrobot.com/image/data/TEL0026/TEL0026_Datasheet.pdf]https://www.dfrobot.com/image/data/TEL0026/TEL0026_Datasheet.pdf[/url]
userHeadPic Lauren
2013-01-18 00:12:25 [quote="Lauren"]
1. I've updated the wiki page for the xbee shield for Arduino...
[/quote]
Thank Lauren for the update.

For programming the xbee, the switches must be :

- Connection Switch = PROG
- Interface Switch = USB

Is it correct ?

[quote="Lauren"]
2. About the name of them module, do you mean to config the bluetooth device name displayed on your Android phone?
[/quote]

With this command : sendBlueToothCommand("\r\n+STNA=hexapod\r\n");
I should have this name on my bluetoohth network on my android phone but I have this default name "Bluetooth_Bee_V2" (I suppose).
Perharps a switch problem, I look at this this tonight.

Thx !
userHeadPic LeSanglier
2013-01-18 00:12:25 [quote="Lauren"]
1. I've updated the wiki page for the xbee shield for Arduino...
[/quote]
Thank Lauren for the update.

For programming the xbee, the switches must be :

- Connection Switch = PROG
- Interface Switch = USB

Is it correct ?

[quote="Lauren"]
2. About the name of them module, do you mean to config the bluetooth device name displayed on your Android phone?
[/quote]

With this command : sendBlueToothCommand("\r\n+STNA=hexapod\r\n");
I should have this name on my bluetoohth network on my android phone but I have this default name "Bluetooth_Bee_V2" (I suppose).
Perharps a switch problem, I look at this this tonight.

Thx !
userHeadPic LeSanglier
2013-01-17 23:28:52 Hi LeSanglier,

1. I've updated the wiki page for the xbee shield for Arduino a little to make it clear for your problems.Hope it's helpful to understand the functions.
[url=https://www.dfrobot.com/wiki/index.php/Xbee_Shield_For_Arduino_(no_Xbee)_(SKU:DFR0015)]https://www.dfrobot.com/wiki/index.php/Xbee_Shield_For_Arduino_(no_Xbee)_(SKU:DFR0015)[/url]

2. About the name of them module, do you mean to config the bluetooth device name displayed on your Android phone?

Regards,
Lauren
userHeadPic Lauren
2013-01-17 23:28:52 Hi LeSanglier,

1. I've updated the wiki page for the xbee shield for Arduino a little to make it clear for your problems.Hope it's helpful to understand the functions.
[url=https://www.dfrobot.com/wiki/index.php/Xbee_Shield_For_Arduino_(no_Xbee)_(SKU:DFR0015)]https://www.dfrobot.com/wiki/index.php/Xbee_Shield_For_Arduino_(no_Xbee)_(SKU:DFR0015)[/url]

2. About the name of them module, do you mean to config the bluetooth device name displayed on your Android phone?

Regards,
Lauren
userHeadPic Lauren
2013-01-17 15:12:44 Hi,

I use this code to connect my android phone to the xbee bluetooth :

[code]

#include <SoftwareSerial.h>  //Software Serial Port
#define RxD 0 // Pin Arduino Uno
#define TxD 1 // Pin Arduino Uno

SoftwareSerial blueToothSerial(RxD,TxD);

void setup()
{
    Serial.begin(9600);          //Serial port for debugging, Comment this line if not required 
    pinMode(RxD, INPUT);
    pinMode(TxD, OUTPUT);
    setupBlueToothConnection();

}

void loop()
{

  if(blueToothSerial.read() == 'a')
  {
    blueToothSerial.println("You are connected to Bluetooth Bee");
    //You can write you BT communication logic here
  }
}

void setupBlueToothConnection()
{
    Serial.print("Setting up Bluetooth link");      //For debugging, Comment this line if not required   
    blueToothSerial.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400
    delay(1000);
    sendBlueToothCommand("\r\n+STWMOD=0\r\n");
    sendBlueToothCommand("\r\n+STNA=hexapod\r\n");
    sendBlueToothCommand("\r\n+STAUTO=0\r\n");
    sendBlueToothCommand("\r\n+STOAUT=1\r\n");
    sendBlueToothCommand("\r\n+STPIN=0000\r\n");
    delay(2000); // This delay is required.
    blueToothSerial.print("\r\n+INQ=1\r\n");
    delay(2000); // This delay is required.
    Serial.print("Setup complete");

}

void sendBlueToothCommand(char command[])
{
    char a;
    blueToothSerial.print(command);
    Serial.print(command);                          //For debugging, Comment this line if not required   
    delay(3000);

    while(blueToothSerial.available())              //For debugging, Comment this line if not required 
    {                                              //For debugging, Comment this line if not required 
      Serial.print(char(blueToothSerial.read()));  //For debugging, Comment this line if not required 
    }                                              //For debugging, Comment this line if not required 
}
[/code]

In Serial Monitor, the at command display correctly.

I use the EF_BluetoothBeeV1.1.zip application ([url=http://www.elecfreaks.com/829.html]http://www.elecfreaks.com/829.html[/url]). The connection to xbee bluetooth is okay because the same at command display my phone.

But I would like to know send a command to display the "You are connected to Bluetooth Bee" message ?

Thx.

Ps :

- There is something very strange : the name of the bluetooth is unchanged always "Bluetooth_Bee_V2" instead "hexapod"
- There is "AT mode", XBEE/USB" and "RUN/PROG" what do they means ?
userHeadPic LeSanglier
2013-01-17 15:12:44 Hi,

I use this code to connect my android phone to the xbee bluetooth :

[code]

#include <SoftwareSerial.h>  //Software Serial Port
#define RxD 0 // Pin Arduino Uno
#define TxD 1 // Pin Arduino Uno

SoftwareSerial blueToothSerial(RxD,TxD);

void setup()
{
    Serial.begin(9600);          //Serial port for debugging, Comment this line if not required 
    pinMode(RxD, INPUT);
    pinMode(TxD, OUTPUT);
    setupBlueToothConnection();

}

void loop()
{

  if(blueToothSerial.read() == 'a')
  {
    blueToothSerial.println("You are connected to Bluetooth Bee");
    //You can write you BT communication logic here
  }
}

void setupBlueToothConnection()
{
    Serial.print("Setting up Bluetooth link");      //For debugging, Comment this line if not required   
    blueToothSerial.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400
    delay(1000);
    sendBlueToothCommand("\r\n+STWMOD=0\r\n");
    sendBlueToothCommand("\r\n+STNA=hexapod\r\n");
    sendBlueToothCommand("\r\n+STAUTO=0\r\n");
    sendBlueToothCommand("\r\n+STOAUT=1\r\n");
    sendBlueToothCommand("\r\n+STPIN=0000\r\n");
    delay(2000); // This delay is required.
    blueToothSerial.print("\r\n+INQ=1\r\n");
    delay(2000); // This delay is required.
    Serial.print("Setup complete");

}

void sendBlueToothCommand(char command[])
{
    char a;
    blueToothSerial.print(command);
    Serial.print(command);                          //For debugging, Comment this line if not required   
    delay(3000);

    while(blueToothSerial.available())              //For debugging, Comment this line if not required 
    {                                              //For debugging, Comment this line if not required 
      Serial.print(char(blueToothSerial.read()));  //For debugging, Comment this line if not required 
    }                                              //For debugging, Comment this line if not required 
}
[/code]

In Serial Monitor, the at command display correctly.

I use the EF_BluetoothBeeV1.1.zip application ([url=http://www.elecfreaks.com/829.html]http://www.elecfreaks.com/829.html[/url]). The connection to xbee bluetooth is okay because the same at command display my phone.

But I would like to know send a command to display the "You are connected to Bluetooth Bee" message ?

Thx.

Ps :

- There is something very strange : the name of the bluetooth is unchanged always "Bluetooth_Bee_V2" instead "hexapod"
- There is "AT mode", XBEE/USB" and "RUN/PROG" what do they means ?
userHeadPic LeSanglier
2013-01-09 14:08:05 [quote="Lauren"]
Are you going to extend them to your hexapod? [/quote]
Yes !! :D
Thanks you for your help ! ;-)
userHeadPic LeSanglier
2013-01-09 14:08:05 [quote="Lauren"]
Are you going to extend them to your hexapod? [/quote]
Yes !! :D
Thanks you for your help ! ;-)
userHeadPic LeSanglier
2013-01-08 20:32:02 Hi,

Are you going to extend them to your hexapod?  ;D Here's some solution I known.

1. Bluetooth: Bluetooth Bee/WIFI Bee + xbee shield
[url=https://www.dfrobot.com/index.php?route=product/product&filter_name=bluetooth%20bee&product_id=193#.UOugt02oPvM]https://www.dfrobot.com/index.php?route=product/product&filter_name=bluetooth%20bee&product_id=193#.UOugt02oPvM[/url]
[url=https://www.dfrobot.com/index.php?route=product/product&filter_name=xbee%20shield&product_id=61]https://www.dfrobot.com/index.php?route=product/product&filter_name=xbee%20shield&product_id=61[/url]

2. WIFI: Arduino WIFI shield or DFRobot WIFI shield
[url=https://www.dfrobot.com/index.php?route=product/product&filter_name=wifi&product_id=548#.UOuhLU2oPvM]https://www.dfrobot.com/index.php?route=product/product&filter_name=wifi&product_id=548#.UOuhLU2oPvM[/url]
[url=https://www.dfrobot.com/index.php?route=product/product&filter_name=wifi&product_id=790#.UOuhLU2oPvM]https://www.dfrobot.com/index.php?route=product/product&filter_name=wifi&product_id=790#.UOuhLU2oPvM[/url]
userHeadPic Lauren
2013-01-08 20:32:02 Hi,

Are you going to extend them to your hexapod?  ;D Here's some solution I known.

1. Bluetooth: Bluetooth Bee/WIFI Bee + xbee shield
[url=https://www.dfrobot.com/index.php?route=product/product&filter_name=bluetooth%20bee&product_id=193#.UOugt02oPvM]https://www.dfrobot.com/index.php?route=product/product&filter_name=bluetooth%20bee&product_id=193#.UOugt02oPvM[/url]
[url=https://www.dfrobot.com/index.php?route=product/product&filter_name=xbee%20shield&product_id=61]https://www.dfrobot.com/index.php?route=product/product&filter_name=xbee%20shield&product_id=61[/url]

2. WIFI: Arduino WIFI shield or DFRobot WIFI shield
[url=https://www.dfrobot.com/index.php?route=product/product&filter_name=wifi&product_id=548#.UOuhLU2oPvM]https://www.dfrobot.com/index.php?route=product/product&filter_name=wifi&product_id=548#.UOuhLU2oPvM[/url]
[url=https://www.dfrobot.com/index.php?route=product/product&filter_name=wifi&product_id=790#.UOuhLU2oPvM]https://www.dfrobot.com/index.php?route=product/product&filter_name=wifi&product_id=790#.UOuhLU2oPvM[/url]
userHeadPic Lauren
2013-01-08 14:26:02 Hi,

I would like to connect an Arduino 1280 controller with a bluetooth or wifi shield, what is the good method to connect them ?

Thank you ! :D
userHeadPic LeSanglier