Help pls. I'm beginner on Arduino. So anyone successfully set up the Itead HC-06 to Arduino UNO works perfectly??
I have no idea how... All tutorial are teaching on another type of HC-06, so I don't know how to make it work, I've follow the tutorial on :
however, it doesn't respond anything when I send the text via BT, so I am wonder is it because of the slight different on the model or my BT problem? I realized when I send TEXT , the LED got blink. I did change the V to 3.3V still same
Sounds like it's working, by the blink when something is sent. Please connect the BT module's TX and RX together and you should see whatever you send out sent back to you. This should confirm you have a good 2-way communication with the BT module.
Next, you should tell us what you are doing with your arduino. Any code, connection? Photo?
However they are both HC-06. The only one different that I know is mine HC-06 support 3.3V but theirs HC-06 used 5V. At first I was connect my BT to 5V, and changed it after I realesed.
BT --> Arduino
G --> GND
V --> 3.3V
GO --> D10
GI --> D11
my setup:
the code that I try from tutorial:
#include <SoftwareSerial.h>
SoftwareSerial BT(10, 11);
// creates a "virtual" serial port/UART
// connect BT module TX to D10
// connect BT module RX to D11
// connect BT Vcc to 5V, GND to GND
void setup()
{
// set digital pin to control as an output
pinMode(13, OUTPUT);
// set the data rate for the SoftwareSerial port
BT.begin(9600);
// Send test message to other device
BT.println("Hello from Arduino");
}
char a; // stores incoming character from other device
void loop()
{
if (BT.available())
// if text arrived in from BT serial...
{
a=(BT.read());
if (a=='1')
{
digitalWrite(13, HIGH);
BT.println("LED on");
}
if (a=='2')
{
digitalWrite(13, LOW);
BT.println("LED off");
}
if (a=='?')
{
BT.println("Send '1' to turn LED on");
BT.println("Send '2' to turn LED on");
}
// you can add more "if" statements with other characters to add more commands
}
}
After upload to the board, according to the tutorial, I downloaded "Bluetooth terminal" on Android Phone, connect to the HC-06 bluetooth device.
*Everything works fine here. I can connect it.
But when I connected, supposedly I should receive "Hello from Arduino". But nothing I received.
And whatever text I send included '1' or '2', nothing was responded.
*Sorry my mistake it does not blink actually, I don't remember how I made it cos I keep trying and modifying
#include <SoftwareSerial.h>
SoftwareSerial BT(10, 11);
// creates a "virtual" serial port/UART
// connect BT module TX to D10
// connect BT module RX to D11
// connect BT Vcc to 5V, GND to GND
void setup()
{
// set digital pin to control as an output
pinMode(13, OUTPUT);
// set the data rate for the SoftwareSerial port
Serial.begin(9600);
BT.begin(9600);
// Send test message to other device
BT.println("Hello from Arduino");
}
//char a; // stores incoming character from other device
void loop()
{
BT.println("LED TESTING");
Serial.println("LED TESTING");
}
Nothing println on phone BT terminal, only arduino serial monitor printing lines
all resource out there keep showing me
Demo:
Connect D0 port of electronic brick of serial port Bluetooth to D0 port of Arduino board, D1 port to D1 port of Arduino board, and we will use the following program to keep sending character string of HELLO and have them displayed via Bluetooth serial port software of cellphone.
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("HELLO"); //Send the "HELLO" character string to HC-06
delay(1000); // wait for a second
}
This really confused me. What is this? How? If I change D10/D11 to D0/D1, the arduino upload failed with error "avrdude stk500_getsync()"
Also can I simply change D10/D11 to any other number on my own? would caused any fatality? XD sorry I'm really new in arduino
Disconnect the module from D0/D1 while loading a sketch. Afterwards connect it again, and use it as Serial. You may have to press the Reset button after connecting the module.
You also can use SoftwareSerial or AltSoftSerial to create another serial port in software, to which you can connect the module.
Direct connection of 3.3V devices to the 5V Arduino can cause problems, due to the different logic signal levels. My HC-06 module works this way, others may fail.
As I said, do a loop-back check, disconnect DO and DI from arduino and connect them together. Open app and send things. See if you receive them back. Did you read my post?
elliotching:
However they are both HC-06. The only one different that I know is mine HC-06 support 3.3V but theirs HC-06 used 5V. At first I was connect my BT to 5V, and changed it after I realesed.
BT --> Arduino
G --> GND
V --> 3.3V
GO --> D10
GI --> D11
This could possibly be the real problem - you have stuffed the module by feeding it 5v. Note also that you are also feeding it 5v signal to GI. It is good practice to use a 1k/2k voltage divider on Arduino Tx.
*Everything works fine here. I can connect it.
But when I connected, supposedly I should receive "Hello from Arduino". But nothing I received.
And whatever text I send included '1' or '2', nothing was responded.
This doesn't make sense. It either works fine or it doesn't, and how do you know you are cionnected anyway? Further, connecting does not necessarily ensure you will receive a "Hello from Arduino". You will only get that after you power up Arduino, or press the reset button.
*Sorry my mistake it does not blink actually
Which perhaps confirms the first point above.
There is comment about the LEDs in the notes I alluded to.