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

Thread: Teensy 3.5 Hardware Serial

  1. #1
    Junior Member
    Join Date
    Nov 2018
    Location
    Brisbane
    Posts
    2

    Teensy 3.5 Hardware Serial

    Hi All,

    I have been struggling for a number of hours trying to get my Teensy 3.5 communicating to an Arduino over hardware serial.
    To ensure it was not (well less likely) a software error I stripped my programs down to a simple serial print (Arduino) and serial receive (Teensy) as seen below. (I tried using the example Teensy code too.)

    I have quadruple checked my wiring between the two and continuity checked between the RX, TX and TX, RX pins of the Arduino, Teensy respectably. I have also had other devices communicating with the Arduino over the serial port in question.
    I have tried writing from the Teensy to the Arduino and even tried another Teensy both to no avail.

    The Teensy is running at 96MHZ if that matters.

    Any help is much appreciated!


    Code:
    //this is the Teensy 3.5 code
    void setup() {
      // put your setup code here, to run once:
      Serial.begin(9600);
      Serial1.begin(9600);
      Serial.println("Setup Finished");
    }
    
    void loop() {
      // put your main code here, to run repeatedly:
      if(Serial1.available()> 0){
        Serial.write(Serial1.read());
      }
    }
    Code:
    //this is the Arduino mega code
    void setup() {
      // put your setup code here, to run once:
      Serial.begin(9600);
      Serial1.begin(9600);
      Serial.println("Setup Finished");
    }
    
    void loop() {
      // put your main code here, to run repeatedly:
      Serial1.print("data");
      Serial.println("Data Sent to Teensy");
      delay(1000);
    }

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,691
    Looks like it ought to work.

    Can you show us a photo of how the wires are actually connected. I know you've already checked, but maybe we'll notice something if you show a photo?

  3. #3
    Junior Member
    Join Date
    Nov 2018
    Location
    Brisbane
    Posts
    2
    Cheers for getting back so quickly!

    I just realised I've had the reference card out by 180deg...

    Everything's working now.

Posting Permissions

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