Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Teensy 3.2 and HC-05

  1. #1
    Junior Member
    Join Date
    Feb 2020
    Posts
    10

    Teensy 3.2 and HC-05

    Hello,

    I am trying to write data out over a bluetooth connection using the Teensy 3.2 and HC-05. When I use this code, I am able to view the output through the TeraTerm (Putty equivalent) serial monitor.

    Code:
    void setup() {
      Serial.begin(9600);
    }
    
    void loop() {
      Serial.println("Hello");
    }
    However, when I use the Serial1 TX/RX pins with the HC-05, I get no output. The TX pin on my HC-05 is going to Pin 0 (RX) and RX Pin of HC-05 is going to Pin 1 (TX).

    Code:
    #define HWSERIAL Serial1
    
    void setup() {
      HWSERIAL.begin(9600);
    }
    
    void loop() {
      HWSERIAL.println("Hello");
    }

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,940
    In cases like this it might help to see pictures of the wiring.

    It might show up things like, What voltage are you passing to the VCC pin of the HC-05? Do you have a ground wire?

    Are you using a breadboard? If so did you solder the pins of the T3.2. ...

    And of course I am assuming you have a Bluetooth connection to your PC (or other device) and your HC-05? And they are connected?

  3. #3
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,363
    You may want to start with this post: https://forum.pjrc.com/threads/58575...highlight=hc05 and follow the link to the referenced thread.

  4. #4
    Junior Member
    Join Date
    Feb 2020
    Posts
    10
    My issue was that I assumed that all Bluetooth devices would communicate over the same COM port on my computer. When I was using an HC-05 with my UNO it was on COM9 and when I used a different HC-05 module with the Teensy, it was on COM11. It is now working.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •