Go Down

Topic: ¿How create a library in Arduino? (Read 1 time) previous topic - next topic

diego ulises

I want making a library in arduino, I have not some idea, I Need help.
I do not know where to start and read what is on the official arduino page but I do not understand anything I need a more clear help please

joeblogs

open up some libray files and have a look at them.  they are just a header (.h) file and a source file (.cpp).
the header declares functions variables, and the source file defines the functions.

a library is a collection of variables and functions

OldSteve

Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.


OldSteve

I saw that myself and I did not understand
It's fairly straightforward. Which part didn't you understand?

Did you work through the example and create the 'Morse' library?
Please do not PM me for help. I am not a personal consultant.
And others will benefit as well if you post your question publicly on the forums.

PaulS

Quote
I saw that myself and I did not understand
Then you are not ready to be creating libraries. When the light comes on, you'll know it, and then you can create a library of your own.
The art of getting good answers lies in asking good questions.

septillion

I can't agree more with PaulS :) Keep learning about writing C/C++ and you'll get there.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

BulldogLowell

I saw that myself and I did not understand
Then there are other resources like Adafruit which has a progressive tutorial that begins with some basics here and then introduces classes here.

Learning how to create a class is fundamental to your goal of making a library.  Once you have your class working, putting it into the proper file structure is somewhat trivial.

More people should look at those tutorials...

septillion

But on the other hand, a class != library on it's own. Nor is a library a class per se. A library can also be plain C if you want to.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

BulldogLowell

A library can also be plain C if you want to.
yes, so in that case OP can run straight to the more trivial bits.

;)


TomGeorge

Hi,
Look at this YouTube, it may help.

https://www.youtube.com/watch?v=fE3Dw0slhIc&t=96s

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Go Up