Pages: [1]   Go Down
Author Topic: Bluetooth and Arduino problems?  (Read 825 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been trying to test a bluetooth transceiver(BT0417C) I bought, and I have a few problems. First of all, my computer (with a bluetooth adapter) uses two COM ports to communicate with the transceiver, one each for input and output, understandably. But for some reason, the output COM port, the one that transmits to the transceiver, is missing. When I open up the properties for the transceiver in my computer, I see that it uses COM6; however, arduino and processing only detect COM7(recieving port). I've been using the code from Arduino playground (http://arduino.cc/playground/Learning/Tutorial01) to test it out, and I'm pretty sure there are no hardware problems that would affect it (I have a deuemilanove, in case that helps). When I was running the processing code (back when I had two COM ports for the transciever) I configured it to use the COM port that transmits to the module, naturally, but I kept getting an error message. (I don't have access/can't find the port anymore, and I forgot to copy the error codes, so I don't have it, sadly.)

Also, some questions. I've connected the bluetooth rx and tx pins to arduino rx and tx, respectively. Do I need to declare the pins as output/input or is there some native protocol that allows the bluetooth module to access the serial already? Do I always need to use rx and tx for signal transmission? Or are any of the digital pins applicable?

Well, that's basically it. Sorry, kinda new to this, lol.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 50243
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I've connected the bluetooth rx and tx pins to arduino rx and tx, respectively. Do I need to declare the pins as output/input
No. The HardwareSerial class (Serial is an instance) takes care of that.

Quote
or is there some native protocol that allows the bluetooth module to access the serial already?
The bluetooth module knows nothing about how the Arduino handles data. That is up to the Arduino. The Arduino sends data to the bluetooth device using Serial.write(), Serial.print(), or Serial.println(). It gets data from the bluetooth device using Serial.available() and Serial.read().

Quote
Do I always need to use rx and tx for signal transmission?
If you want to use the HardwareSerial class, yes.

Quote
Or are any of the digital pins applicable?
Using NewSoftSerial, yes.
Logged

Netherlands
Offline Offline
Sr. Member
****
Karma: 1
Posts: 290
(:-)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to cross rx and tx. So rx arduino goes to tx bluetooth and vice versa.
Logged

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

@PaulS:
Thanks, that cleared up some of my confusion. This helps me understand some of the interfacing between the arduino and modules.

@wortelsoft:
I recently realized that mistake, and now I'm trying it all over again. Hopefully, it works this time. Thanks!

Also, I have a few more questions. I'm thinking of converting a pair of headphones into bluetooth ones. Would I need to refine/use a pre-amplifier when transmitting the signal? Or since the headphones already have built-in ones, would I be able to create a small module using the bluetooth module connected to the 3.5mm jack?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 50243
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Would I need to refine/use a pre-amplifier when transmitting the signal?
When transmitting what signal from where?
Logged

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

From the headphones?

Also, I'm still having trouble with the bluetooth module. In fact, it's gotten worse. I downloaded a COM cleaner so I could try to reset my COM ports, in case some old appliance that used to use it was still affecting the newer one (the module). It did nothing for a little while, but now I can't even program the arduino. In fact, the arduino COM port itself disappears from time to time. Um...help?
Logged

Pages: [1]   Go Up
Jump to: