Pages: [1]   Go Down
Author Topic: Two Arduino boards via Bluetooth  (Read 610 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, everyone.

I am starting an interesting project, where I need to make connection between two arduino boards via bluetooth. i am using bluetooth and arduino for the first time.

I am using:
1. Arduino Duemilanove, ATmega328;
2. Arduino Mega, ATmega 2560;
3. 2x HC-05 bluetooth modules: http://www.ebay.com/itm/310540196588?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

I also found this http://cu.rious.org/make/hc-05-bluetooth-with-arduino/ and tried to make a connection but with no luck. Maybe where are some problems in code? I am talking about PAIR, BIND, CMODE or other commands.

Maybe someone have an alternative code or useful advices? Maybe someone already have done this and could explain the details?
Any help would be appreciate.

Best regards,
Simas
Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I think you should put many debug statements (Serial.print()) in the code, otherwise there are too many things that may go wrong and you'll never know.

First of all, however, how did you connect the modules to the Arduinos? From the picture I would say there is no exposed connection to the RESET or PIO11 pins of the module. Unless you made the connections yourself the code will not work, because it expects the module's RESET to be connected to the Arduino's pin5, and PIO11 to pin8. Additionally, if you have a Mega you cannot use SoftwareSerial on pins 6 and 7 (see this page: http://arduino.cc/en/Reference/SoftwareSerial.

Then there may be problems at the software level, but you should first make sure that the hardware is properly setup.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your replay. I didn't know about Mega's limitations of serial.

I manually soldered these two wires to Bluetooth module, so I can use them. Maybe you know something more about PAIR, BIND functions? I read manual, but I think I didn't get it right.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found my problem with connections. Now everything works fine smiley
Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley

[edit] Well I was also going to say that after the first successful pairing the devices should be capable of pairing again automatically, without repeating the commands seen in the code. That's just my supposition, however. The command set is much more complete than the one used by the devices I have, have fun.
« Last Edit: March 31, 2013, 03:11:27 pm by spatula » Logged

Pages: [1]   Go Up
Jump to: