Hi, i am really really freshman of Arduino.
I use Arduino IDE ver 2.3.2
I want to connect the HC-06 module to my laptop via Bluetooth.
I entered the following,
I solved the problem.
Thanks to everyone who helped
Hi, i am really really freshman of Arduino.
I use Arduino IDE ver 2.3.2
I want to connect the HC-06 module to my laptop via Bluetooth.
I entered the following,
I solved the problem.
Thanks to everyone who helped
Welcome to the forum
It looks like you attempted to put the code in code tags (thank you) but failed
In my experience the easiest way to tidy up the code and add the code tags is as follows
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.
Is the HC-06 connected to the Arduino correctly, ie Tx to Rx and vice versa ?
Which Arduino board are you using ?
Thanks to answer on my post.
#include <SoftwareSerial.h>
int bt_Tx=11;
int bt_Rx=10;
SoftwareSerial bt(bt_Rx, bt_Tx);
void setup()
{
Serial.begin(9600);
bt.begin(9600);
}
void loop()
{
if (bt.available())
{
Serial.write(bt.read());
}
if (Serial.available())
{
bt.write(Serial.read());
}
}
It's that code what i used, and I've already tried swapping TX and RX.
But it still doesn't work..
No code tags ?
Did you follow my instructions on how to copy code from the IDE ?
Now it's ok, but we meant you should "edit" your posts to format the code, you have now two more unformatted code left making the thread a bit cluttered.
So please edit post #1 and #4 using the "pen" icon:
then remove the duplicated code from those and save the result, so you just keep the last post with the "readable" code.
Thanks.
@double0_mk I am sure that you will think that asking you to use code tags seems petty and not doing so is not such a problem with a short sketch, but formatting the code and using code tags really does make it easier for anyone trying to help you
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.