C/C++ Question Library wrapper help

atiaust

Active Member
Licensed User
Longtime User
Hi everyone,

I am trying to learn how to create libraries for B4R.

Have studied all the posts and looked at the suggested examples including rEEPROM for which I can't find the .h and .cpp source files.

I have created a small LED13 library following the "How to make libraries for Arduino" tutorials and have the library functioning in Arduino.

Can someone please help me understand how to finish the attached rLED13.h & rLED13.cpp wrappers.

Thanks & much appreciated.
 

Attachments

  • LED13.zip
    1.3 KB · Views: 410

atiaust

Active Member
Licensed User
Longtime User
The source code of all internal libraries is available in the installation folder.

Why do you need to create a library?

Hi Erel,

I would like to understand how to create the libraries from scratch for interest sake.

I work with industrial controls and there are some Arduino projects I am working on I think would benefit from me being able to create libraries for them.

Your explanation in "Creating Libraries for B4R" is good but a little daunting for those of us with very little C, C++ experience.

Thanks.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Your explanation in "Creating Libraries for B4R" is good but a little daunting for those of us with very little C, C++ experience.
This is exactly the problem. To create non-trivial libraries you need to have some C knowledge.

If you only need to call a few methods from a different library then it can be accomplished quite easily. I think that this library is simple enough to start with: https://www.b4x.com/android/forum/threads/liquidcrystal_i2c.66460/
 
Top