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

Thread: Newbie question

  1. #1

    Newbie question

    Can the basic arduino libraries be used for the teensy? Or only the teensy libraries provided by the Teensyduino addon?

  2. #2
    Senior Member houtson's Avatar
    Join Date
    Aug 2015
    Hi Fluxanode, depends on the library, lots of them do work without change - what library are you wanting to use?

    Cheers, Paul

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    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.

  4. #4
    Thanks for the replies. I would like to use PID control and modbus libraries. Appreciate any suggestions...

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    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.

  6. #6
    Thanks for the response! I was just generally asking and don't yet have a specific library in mind.

Posting Permissions

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