Newbie question

Fluxanode

Well-known member
Can the basic arduino libraries be used for the teensy? Or only the teensy libraries provided by the Teensyduino addon?
 
Hi Fluxanode, depends on the library, lots of them do work without change - what library are you wanting to use?

Cheers, Paul
 
Most Arduino libraries work.

Libraries designed to work on any board usually run fine.

Many of the libraries are for sensors which use I2C or SPI communication. They generally work, because those libraries in turn use the Wire and SPI library, which is provided by Teensyduino. So when you use a library like Adafruit_BNO055 or SparkFun_BNO080 to read a motion sensor, the code from Adafruit or Sparkfun runs properly because the Teensyduino-provided copies of Wire and SPI to the actual hardware dependent communication work.

Of course there are some very old libraries which are tightly tied to the AVR chips. Those usually work on Teensy 2.0, but do not compile if you select any newer boards.

Some libraries are designed to only work on a specific chip or board. Usually when you find these, the author often states the specific hardware in the library description. Rarely do those sorts of libraries work on any other boards.
 
Thanks for the replies. I would like to use PID control and modbus libraries. Appreciate any suggestions...
 
Several libraries fit those descriptions. We can help more when you're specific with your questions, like exactly which libraries you're using or want to use. Generally speaking, to give useful suggestions rather then merely narrow tech answers, we need to also have understanding of what you're actually trying to accomplish. We often do help quite a lot on this forum, but there's only so much we can do without details and context.
 
Back
Top