WhyWhy
Member level 4
Hi Guys,
i followed the instruction from Arduino HC06. I can use serial port ( Com 3 ) to turn on & off the LED by sending the command f or n at Arduino Leonardo as what he did. But when i connect the HC06 with my TeraTerm ( Bluetooth Terminal ) , it unable to type any command in it after connected to COM port 5 ( Incoming ). Below is my connection to HC06 and i attached the picture connection of arduino, LED and Blueeoth. I unable to turn on and off using my bluetooth terminal at my laptop. Somehow i try with my Android device and connect it to the HC06 by typing the command f or n using bluetooth terminal apk also cannot turn on and off.Please Help.
**broken link removed**
My tera term connection:
**broken link removed**
HC06 Microcontroller
Tx -> RX
Rx -> TX
GND -> GND
VCC -> 3.3V
Extra: LED -> pin 8
Setting Baud rate and etc : 9600, 1,none,0
i followed the instruction from Arduino HC06. I can use serial port ( Com 3 ) to turn on & off the LED by sending the command f or n at Arduino Leonardo as what he did. But when i connect the HC06 with my TeraTerm ( Bluetooth Terminal ) , it unable to type any command in it after connected to COM port 5 ( Incoming ). Below is my connection to HC06 and i attached the picture connection of arduino, LED and Blueeoth. I unable to turn on and off using my bluetooth terminal at my laptop. Somehow i try with my Android device and connect it to the HC06 by typing the command f or n using bluetooth terminal apk also cannot turn on and off.Please Help.
**broken link removed**
My tera term connection:
**broken link removed**
HC06 Microcontroller
Tx -> RX
Rx -> TX
GND -> GND
VCC -> 3.3V
Extra: LED -> pin 8
Setting Baud rate and etc : 9600, 1,none,0
Code:
char blueToothVal; //value sent over via bluetooth
char lastValue; //stores last state of device (on/off)
void setup()
{
Serial.begin(9600);
pinMode(13,OUTPUT);
}
void loop()
{
if(Serial.available())
{//if there is data being recieved
blueToothVal=Serial.read(); //read it
}
if (blueToothVal=='n')
{//if value from bluetooth serial is n
digitalWrite(13,HIGH); //switch on LED
if (lastValue!='n')
Serial.println(F("LED is on")); //print LED is on
lastValue=blueToothVal;
}
else if (blueToothVal=='f')
{//if value from bluetooth serial is n
digitalWrite(13,LOW); //turn off LED
if (lastValue!='f')
Serial.println(F("LED is off")); //print LED is on
lastValue=blueToothVal;
}
delay(1000);
}