Show Posts
Pages: 1 ... 47 48 [49] 50 51 ... 231
721  Using Arduino / Project Guidance / Re: Creating a bluetooth controller on: March 06, 2014, 11:58:23 pm
I have four bluetooth modules, two are HC-05, and the other 06(which ones were which, I dont remember), which I took the time to test and see how they work and how far they can go before cutting out.

The far wall of my bedroom to my front door is 37.2ft, in which I wanted to know how far I could be and still have them pair up. I found out that they can still find each other, pair up at 34 - 36 ft, but given my house is mesh lined, I thought the number would vary. Turns out, not by much. I tested the paring range again outside and roughly at 40ft they could just barely pair up. (They would pair up for a few seconds then lose connection)

As I said, yes they can be difficult to set up if you're doing it for the first time, but once you get a hang of it, its simple plug and play. At least with the modules I have. They are all currently set to the default setting, 9600, no parity bit...etc. Yet, I can throw together a simple Serial sketch to send one char from one arduino to the other and see it on the serial monitor.

A V1.2 will not pair with a V1.02 nor to a V1.05, but two V1.05 will. So technically I only have one working pair, but I can still use the other slave, (V1.2) to debug to my computer if needed.

These are the only modules I own, so the same can't be said with confidence for the blue, Silver or GoldSmirf. Their protocol may be completely different or they could be the same, but if I don't have them, then I can't test them.

I tried to resize the image as best I could without losing quality.

Added: the two on the left do automaticly pair to one another, but the other two, since they are not the same version, I can't be certain. I do know that all four need to be manually paired when connecting to my laptop.
722  Using Arduino / Project Guidance / Re: Creating a bluetooth controller on: March 06, 2014, 08:39:37 pm
Quote
I'm not surprised you have no idea how to do it and, while Hazard may be inclined to elaborate, I don't think the HC-0x are a good place to start.
It's a simple serial connection, why is that hard to understand? No, there is no actually library dedicated to bluetooth, but there really doesn't need to be. If you can send a single character to the arduino with the serial monitor, then it should not be so difficult to remove the connection and make it wireless.

I'll admit it is tough to understand how the bluetooth modules need to be set up, but once you get past that, it's a breeze. I myself had a hard time getting my modules to work and it wasn't until much trial and error that I found out that most modules can only pair to their counterpart if they are  same versions.  I also found out that a master wont connect to the bluetooth in a computer or laptop nor will it connect to another master. You can have Master to slave and slave to slave but that's it.

The module AgentNoise has, must be a slave otherwise it would not have connect to his phone, unless his phone knows to change the state of the module from master to slave, but I doubt it.

Another thing to know is most bluetooth modules, both masters and slaves, are usually set to 9600 by default. So if or when they do auto connect, you can run a simple sketch on both to send and receive a single character between the two. Maybe have one blink the LED on the others board.
723  Using Arduino / Project Guidance / Re: Creating a bluetooth controller on: March 06, 2014, 05:18:42 pm
What bluetooth modules are you using, most HC-05/06 modules pair automatically when they are within a 30 ft range of each other.
724  Using Arduino / Project Guidance / Re: Creating a bluetooth controller on: March 06, 2014, 03:58:17 pm
Quote
I have a robot created that I can control with my Android phone via Bluetooth
This is a bit confusing, if you created a robot that already work with your phone over bluetooth, then how are you having trouble creating a bluetooth controller? Did you create the code for your phone or did you just copy and paste in someone elses without actually understanding it? I would think the controller would be extremely easy to make considering you should already know what to send to the robot to get it to work. Are you looking to have the robot control the controller? No, so I would think you would want the bluetooth in the robot, to be the slave and the bluetooth in the controller be the master.

What seems to be giving you trouble that you can't figure out yourself?
725  Using Arduino / Programming Questions / Re: [SOLVED]Need help referencing two classes in one constructor. on: March 06, 2014, 12:34:43 am
The way the library is written, it should work with a regular Lcd too.
726  Using Arduino / Programming Questions / Re: Transfer data to arduino via bluetooth on: March 05, 2014, 09:19:53 pm
Quote
Basically I found it online and modifying according to my need.

That never usually works out correctly. Try the example program BluetoothChat and see if that allows you to connect to your BT module.
727  Using Arduino / Programming Questions / Re: [SOLVED]Need help referencing two classes in one constructor. on: March 05, 2014, 09:03:36 pm
I absolutely do, Thank you for all of your help. I learned a great deal, and I'm actually using what you taught me for my other libraries.

Again Thank you very much.
728  Using Arduino / Programming Questions / Re: Transfer data to arduino via bluetooth on: March 05, 2014, 08:10:16 pm
Did you make the android code yourself, if so, let me take a look at it. I'm wondering if its the UUID that is the issue,or if you even coded it correctly in the first place.
729  Using Arduino / Programming Questions / Re: Transfer data to arduino via bluetooth on: March 05, 2014, 07:28:56 pm
Does you module have a connection indicator? Try a terminal program like RealTerm or Putty.
730  Using Arduino / Programming Questions / [SOLVED] Need help referencing two classes in one constructor. on: March 05, 2014, 07:23:29 pm
Final version of OneWireKeypad.
731  Using Arduino / Programming Questions / Re: Transfer data to arduino via bluetooth on: March 05, 2014, 04:35:32 pm
Try the example I gave you.

SoftwareSerial bluetooth(bluetoothTx, bluetoothRx); //It should be Rx, Tx.
How is it wired and what voltage are you supplying the BT module?
732  Using Arduino / Programming Questions / Re: Transfer data to arduino via bluetooth on: March 05, 2014, 04:14:58 pm
It would help if you posted the full code.

Software Serial Example:
Code:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() 
{
  // Open serial communications and wait for port to open:
  Serial.begin(57600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(4800);
  mySerial.println("Hello, world?");
}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}
733  Using Arduino / Project Guidance / Re: UNO,4x3 keypad and a 8 channel relay on: March 05, 2014, 03:16:38 pm
You only have the one pinMode for the first relay, where are the other 3? "pinMode(ledPin, OUTPUT);"
734  Using Arduino / Programming Questions / Re: Simulate Capacitor charge-discharge cycle, without any external Capacitor on: March 05, 2014, 01:12:09 pm
To simulate a capacitor charging, you need 3 things. Supply voltage, a resistor, and of course a capacitor.
With the resistor and capacitor you can calculate Tau, the time it takes to charge and discharge, which is R*C.
Then you can plug every thing into this formula.

Vc = E*(1 - e^( -Time / Tau) ).

Vc = capacitor Voltage @ time.
E = supply Voltage.
Time is usually in milliseconds, but for better results, use microseconds.

Discharge:

Vc = E*e^(-Time / Tau) .

You will need to convert the formula to C language.
735  Using Arduino / Programming Questions / Re: Bluetooth(HC-05) communication with two arduino uno on: March 04, 2014, 12:51:55 am
Quote
but i have searched some information in the internet.
What have you searched, and what did you learn from it?

Quote
i want to ask how to match these two Bluetooth
They should auto pair when they are within a 30 ft distance of each other.

Quote
and can Bluetooth transmit and receive in the same time?
It may look like they can send and receive data at the same time, but that's because the arduino can process the data faster then we can see it. in actuality, they don't, the arduino can only do one thing at a time.
Pages: 1 ... 47 48 [49] 50 51 ... 231