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

Thread: Looking for the Serial library

  1. #1
    Senior Member jim lee's Avatar
    Join Date
    Dec 2016
    Location
    Anacortes, WA
    Posts
    174

    Looking for the Serial library

    I'd like to create a class that you pass in the address to whatever serial object you are using. But, I can't find the Serial library to see how its derived. (Using a Mac) Anyone?

    Thanks!

    -jim lee

  2. #2
    Member
    Join Date
    Aug 2018
    Location
    Brisbane, Australia
    Posts
    79
    On my machine (Linux) they are in teensy/cores/teensy3/ or teensy/cores/teensy4/ depending on board you are using. Look at HardwareSerial*.*

  3. #3
    Senior Member jim lee's Avatar
    Join Date
    Dec 2016
    Location
    Anacortes, WA
    Posts
    174
    Thanks! I actually found it. Well, not on my machine. But, someone else gave me a link to the source on github. SO I'm good to go. (I think)

    -jim lee

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,221
    On your Mac, control-click Arduino and choose "Show Package Contents". Then click into the Contents/Java/hardware/teensy/avr/cores folders to get to the core library source code.

  5. #5
    Senior Member jim lee's Avatar
    Join Date
    Dec 2016
    Location
    Anacortes, WA
    Posts
    174
    Wait a sec.. Is this why I couldn't find it in.. "Show Package Contents". Contents/Java/libraries/ ? Where I found the other stuff? Because this is the Teensy version of the Arduino IDE?

    No, I take it back. There's an Arduino flavor set in there as well. It looks like the teensy stuff is just another core.

    -jim

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,221
    Oh, there's plenty of other stuff in Teensyduino besides just the core library, including patches to the Java code.

    If you want see why that matters, try programming this speed test onto a Teensy 4.0 or 4.1, with Tools > USB Type set to Serial (the default setting). Then close Teensyduino, run an original copy of Arduino, select the serial device in Tools > Ports, and open the serial monitor. You might wish to save any work first.

Posting Permissions

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