Looking for the Serial library

Status
Not open for further replies.

jim lee

Well-known member
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
 
On my machine (Linux) they are in teensy/cores/teensy3/ or teensy/cores/teensy4/ depending on board you are using. Look at HardwareSerial*.*
 
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
 
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.
 
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
 
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.
 
Status
Not open for further replies.
Back
Top