Go Down

Topic: Benefits (advantages) of creating Libraries (Read 671 times) previous topic - next topic

tavovalencia

Hello everybody.

As my project progresses and I keep adding hardware and libraries I was wondering If I should create my own. I must admit that I'm not as C++ fluent as I would like to be, hence I come here for your comments.

What are the benefits of creating Libraries vs in-sketch formulas?

PeterH

Use of libraries enables code reuse without duplication.
I only provide help via the forum - please do not contact me for private consultancy.

UKHeliBob

I built a simple library to control a motor connected to a H bridge for several reasons

1. To see whether I understood enough to do it.
2. To enable the methods I included in the class to have meaningful names
3. To be able to control more than one motor and to give them names
4. So that I could use the library in several programs without copy/paste of functions between them
5. To get experience so that I could understand the workings of other libraries.
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

PaulS

Quote
What are the benefits of creating Libraries vs in-sketch formulas?

Less hair to wash, comb, etc.

UKHeliBob

Same amount of hair but you just get someone else to wash, comb etc
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Go Up