Computers, Development Boards & Shields
Educational & Robotics Kits
Electronic Sensors
Motors & Controllers
Communication & Display
Electronic Components
Soldering & Lab Tools

0
HC-06 BT2S outputting wrong characaters (Arduino Micro input to TX/RX pins 5vdc external power)

I had a HC-05 that worked with my robot fine until I shorted my previous arduino.  I bought the HC-06 slave with a new arduino micro, and have it hooked up the same way, but the outputs are not the same as the inputs.  If I input ‘f’ the outputs on the serial monitor shows ‘B’,  ‘r’  is an apostrophe ‘ , s is a D, and b is a blank.  I am sure I have TX and RX correct, and I am using a 1k/2k resistor divider for RX for 3.3V.  The power to the HC-06 is through 9VDC to 5VDC regulator chip (not powered through the arduino)  and my serial is running 9600 baud.  I am using blueterm on my android phone as remote to the bt.  The HC-06 should be defaulted to the correct config… any ideas on why the outputs are changing?

 

1 Answer

0

Since the Virtuabotix BT2S Slave already outputs at 3.3 Volts you may be taking your RX too low by using the divider. Try getting rid of the voltage division and let me know if that doesn’t solve the problem. The problem you are describing is usually indicative of a different baud rate, or a voltage being off.

0

I removed the voltage divider and I still have the same outputs. f = D, r = ‘, b = @, l = H and s = b

To check my outputs, I am using the following sketch:

void setup()
{
Serial1.begin(9600);
pinMode(13, OUTPUT);
}

void loop()
{
if (Serial1.available() > 0) {
char ch = Serial1.read();
Serial.print(“Received: “);
Serial.println(ch);
//flashes once when c is pressed on Phone
if (ch == ‘S’) {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
else {
digitalWrite(13, LOW);
}
}
}

Your Answer

No comments yet.

Leave a Reply