Go Down

Topic: Arduino Uno with Bluetooth 2.0 RX/TX (Read 365 times) previous topic - next topic

tdb

I have my Bluetooth 2.0 HC-06 plugged into the pin 0(RX) and 1(TX). When I try to run a sketch I get this error:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x11
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x11
I know it is the plugins to these pins because once I take them out, everything runs fine.
Why are those pins not working?


tdb

I am running this code and typing AT command but my bluetooth 2.0 isn't responding back.
This is my sketch

#include <SoftwareSerial.h>

SoftwareSerial mySerial(5, 6); // RX, TX

void setup() {

Serial.begin(57600);

//pinMode(9,OUTPUT); digitalWrite(9,HIGH);

Serial.println("Enter AT commands:");

mySerial.begin(57600);

}

void loop()

{

if (mySerial.available())

Serial.write(mySerial.read());

if (Serial.available())

mySerial.write(Serial.read());

}

Nick_Pyner

Wrong pins, wrong baud rate, wrong code, and probably wrong anything else - including, most certainly, the wrong instructions. The first thing to consider is: do you really need to do this anyway?

You might find the following background notes useful.

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino

tdb

But when I use the Rx->TX and TX->RX I cannot run arduino sketches I get the error I described above.

Nick_Pyner

#5
Jun 14, 2018, 05:09 am Last Edit: Jun 14, 2018, 05:10 am by Nick_Pyner
So, the background notes I provided a link to were of no use to you after all?

Go Up