Home Page Forums Tinylab HC-06

Tagged: , ,

This topic contains 0 replies, has 1 voice, and was last updated by  gernot.abel 2 years ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #156

    lennart
    Member

    Hello together,

    maybe this becomes a HC-06 general discussion until there are more structure in this forum.

    I have tried the “mobile controlled device” example from the Git. This works very properly!
    After I studied the code I wanted to use the arduino just as a Serial gateway to program the HC-06.

    I tried diffrented code snippets I found while searching HC-06 examples, but I get no response from the HC-06.

    Anyone who tried this?

    Lennart ­čÖé

    #158

    tonykeyser
    Participant

    I concur with Lennart. Also having trouble interacting/programming the HC-06. I am able to pair my mobile device and the RX led on the bluetooth/Xbee/WiFi bus blinks but I can get no feedback via serial monitor.

    #167

    kerem
    Moderator

    ATmega32u4 has a seperate UART for external comminucation. You should use Serial1 instead of Serial (i.e Serial1.begin(9600), Serial1.print()) to comminucate with HC-06 or ESP8266.

    #168

    lennart
    Member

    @kerem: Yes I know that there are two UART connections. But it doesn’t work for me.

    Here is my code:(I tired a batch of different code snippets but nothing worked for me)

     

    #169

    kerem
    Moderator

    @lennart try using this:

    void setup() {
    Serial.begin(9600);
    Serial1.begin(115200);
    }
    void loop() {
    if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte);
    }

    if (Serial.available()) {
    int inByte = Serial.read();
    Serial1.write(inByte);
    }
    }

    #171

    lennart
    Member

    @kerem thanks for this fast reply.

    I tested the code but it does not work for me. I see the blue TX led flashing but there is no response and I don not see the blue RX led flashing.

    In the “mobile controlled device” example the HC-06 baudrate is set to 9600 and this example works perfectly, so I think 9600 is the right baudrate.

    #187

    gernot.abel
    Member

    Thanks @kerem I have the same observation as @lennart – the EPS8266 flashes shortly but nothing else

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.