bluetooth working. why ?

wireless communication and related Bees.

Moderators: lily.li, violet, jessie

Post Reply
mbaroukh
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Sun May 20, 2012 7:10 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Arduino

bluetooth working. why ?

Post by mbaroukh » Sun May 20, 2012 7:26 am

Hi.

I tried my new bluetooth bee today following what's on http://seeedstudio.com/wiki/XBee%C2%AE_Shield. And it works with my arduino uno !
But i don't understand why.
The sample use pin 11 and 12 for serial communication.
But my bee is connected toi pins 1 to 7 (having put both toggle on left).
Nothing on pins 11 and 12 ...

Also, for a mega, the doc says to use pins 50 and 52 but it is connected exactly to the same pins'.
Why is there a difference?

Thanks in advance or any explanation.

Mike

mbaroukh
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Sun May 20, 2012 7:10 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Arduino

Re: bluetooth working. why ?

Post by mbaroukh » Sun May 20, 2012 4:14 pm

Finally, I figured out that the xbee shield use only the ICSP connector.
Pins 0 to 7 are not used.

But I still don't understand where is the link with pins 11/12 of the arduino board ...


Mike

mbaroukh
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Sun May 20, 2012 7:10 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Arduino

Re: bluetooth working. why ?

Post by mbaroukh » Sun May 20, 2012 5:24 pm

Also, for clarity, the sample set rx & tx pin mode :
pinMode(RxD, INPUT);
pinMode(TxD, OUTPUT);

but it is already done by NewSoftSerial in methodes setTX() && setRX() ...
So the

NewSoftSerial blueToothSerial(RxD,TxD);

is enough ...

for the pins 11/12 problem, I suppose that their values can be set/get via ICSP connector and that's what Xbee is doing ?
why not just using digital pins ?
strange ...

My real problem is that I need to stack 2 shields (Xbee and NFC Card reader) that both use ICSP Connector and both does not allow it to be stack.
I suppose I can do something by soldering something but I don'tknow if it is safe to stack them.
It seem that SPI protocol need a Slave Select pin which is not on the ICSP connector.
Is one of pins 2 to 7 used by the xbee connector is used for this ?
I don't thing because nothing declare it.

I'm new to arduino and I must say that I'm a little disapointed : why are there so much extensions if we can't stack them ? Using one and only one module at a time is not really useful ...

Mike

schmron
Elementary-1
Elementary-1
Posts: 145
Joined: Mon Dec 05, 2011 6:12 am

Re: bluetooth working. why ?

Post by schmron » Tue May 22, 2012 5:16 am

ICSP pin MOSI = Pin 11
ICSP pin MISO = Pin 12
ICSP pin SCK = Pin 13

This pins just "breakouted" for easy use with ISP (6 pin AVR-ISP connector).
Best regards from Vienna/Austria
Rony

mbaroukh
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Sun May 20, 2012 7:10 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Arduino

Re: bluetooth working. why ?

Post by mbaroukh » Tue May 22, 2012 1:21 pm

Hi.
Thanks for your reply.
SCK is slave select, right ?
I have 2 cards that both use icsp connector.
when they are both connected, I can make one or the other wok, but not both.
The first that start works.

Do you know of a workaround to make them work ?
I don't thing there is a solution because xbee use NewSoftSerial on pins 11/12 so when my nfc card reader will also use those pins, it will be seen as data by NewSoftSerial ...

Mike

schmron
Elementary-1
Elementary-1
Posts: 145
Joined: Mon Dec 05, 2011 6:12 am

Re: bluetooth working. why ?

Post by schmron » Tue May 22, 2012 9:48 pm

mbaroukh wrote:SCK is slave select, right ?
Yes!
*edit* ops! Fail... SCK = Serial Clock
mbaroukh wrote:Do you know of a workaround to make them work ?
I don't thing there is a solution because xbee use NewSoftSerial on pins 11/12 so when my nfc card reader will also use those pins, it will be seen as data by NewSoftSerial ...
Take a look at this:
http://www.seeedstudio.com/wiki/index.p ... h_Position
Best regards from Vienna/Austria
Rony

Tobe
Pre-kindergarten
Pre-kindergarten
Posts: 34
Joined: Tue Jan 17, 2012 11:04 am
Are you a staff member of seeedstudio?: yes
Which products/projects are your favorite?: Seeeduino

Re: bluetooth working. why ?

Post by Tobe » Fri May 25, 2012 1:49 pm

Hi,there
Thanks for your feedback,for the xbee shield while is connect to the D11,D12,that is compatible for the mega,the mega message:
Not all pins on the Mega and Mega 2560 support change interrupts,
so only the following can be used for RX: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69

if we use the D2 to D7,it will not compatible for the mega.
For the NFC and bluetooth together,you can use the Bees Shield.
Link:http://www.seeedstudio.com/depot/bees-s ... ?cPath=109

Post Reply