Pages: [1]   Go Down
Author Topic: "Hello world" with bluetooth and Arduino  !  (Read 3589 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hardware:
Arduino uno , bluesmirf gold bluetooth ( spp profile)

computer connection :
i can see the bluetooth module , connect to it using the right port , but i cant see anything on the hyper terminal !


wiring :




code:
Code:
void setup()
{
  Serial.begin(9600);
}

void loop()
{

  Serial.println("Hello World");
  }





what im doing wrong ? thanks in advance for the help
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 549
Posts: 46090
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What do you have on the PC side connecting to the bluetooth device?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

bluetoth dongle




i also have this "





both worked and i can see the bluetooth and connect to it  ( i use the toshiba bluetooth software)

« Last Edit: November 28, 2010, 05:12:55 pm by evantheking » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you sure about that baud rate? Your picture looks like the one I have (SFE?) and I think the default was 38k (I don't have it with me). What happens with the blinking light? Does it change when you open the serial port on the PC?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the bluetooth blinks red light . once i connect to it it turns to solid green light.

so my problem is in the hardware? usually the software doesnt change if its usb serial or bluetooth connected?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think your problem is in communicating from the Arduino to the BlueTooth module. The blinking going to solid means that the connection from the PC to the module was made successfully.

Are you powering the Arduino with the barrel jack or USB during the test? I am not sure, but I think you may get port contention if the USB is connected. I use a MEGA for a lot of testing so I have the extra ports and can use the main one for diagnostics. I know on Pro Minis where I have an xBee on the Serial connection I have to disconnect my xBee for FTDI to work and I think I have to disconnect FTDI for the xBee to work (I always do; I am not sure I ever tried leaving it connected).
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One thing more - read the comments on this listing:

http://www.sparkfun.com/products/582

One poster says you are right about default baud rate being 9600.
Another poster said HyperTerminal did not work for him and suggests an alternative. I use PuTTY for most of my testing.

EDIT - one more note: I don't have it in front of me, but the comment about shorting DTR to RTS lit up some synapses; I think I did that. I did serial data comm stuff decades ago and it is one of those things you just do without giving it much thought except for those rare occasions where flow control was really necessary. On many installations it was a big waste of wire as it was shorted on both ends to form a disconnected circle...
« Last Edit: November 29, 2010, 02:21:22 pm by arbarnhart » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks for all the replies..

it worked by changing the serial baud rate !!!

Serial.begin(115200);  in code side

and in the hyper terminal , now i can receive from the bluetooth !

didnt expect the baud rate was the problem

« Last Edit: November 30, 2010, 03:52:22 pm by evantheking » Logged

Pages: [1]   Go Up
Jump to: