Quick question about sketches



  • Hi everyone!

    This is a very nooby question, but I have to ask it because it's kind of got me stopped at the moment... When it comes to sketches, it doesn't matter what type of controller we are using when it comes to how the sketch looks and what libraries we use, right? The libraries that we include area purely for getting the hardware to actually work right? And it's the controller and it's plugins that determine how to use the info sent to it right? So basically if I create a sensor of some sort, I can use different libraries not mentioned here?

    I know it's a silly question, and I think I'm right, but right now it's holding me back so hoping someone can confirm our deny my conclusions. Much thanks.



  • @homer said in Quick question about sketches:

    When it comes to sketches, it doesn't matter what type of controller we are using when it comes to how the sketch looks and what libraries we use, right?

    In some cases a library may not work with a certain chip/controller, but for the most part you just have to compile the sketch for whatever chip/controller you are using and it should work.

    The libraries that we include area purely for getting the hardware to actually work right?

    Yes, the libraries are written to the specifications of the particular piece of hardware and are designed to make a piece of hardware function.

    And it's the controller and it's plugins that determine how to use the info sent to it right?

    If by plugins you are referring to the board definitions, then yes. The board definitions tell the compiler the specifications of the MCU chip being programmed so it knows how to compile the code.

    So basically if I create a sensor of some sort, I can use different libraries not mentioned here?

    Yes. You are not limited to the libraries listed here, although there can be cases where a piece of hardware has more than one available library. With that, in some cases, certain hardware may require a certain library for it to function correctly with MySensors. If you have trouble with a library, search the forums for information and if you can't find the answer to your question, post a comment in the forum.



  • Cool, thanks for your help!


Log in to reply
 

Suggested Topics

  • 3
  • 3
  • 2
  • 4
  • 2
  • 24

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts