A atiaust Active Member Licensed User Longtime User May 20, 2016 #1 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 LED13.zip 1.3 KB · Views: 787
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.
Erel B4X founder Staff member Licensed User Longtime User May 22, 2016 #2 The source code of all internal libraries is available in the installation folder. Why do you need to create a library?
The source code of all internal libraries is available in the installation folder. Why do you need to create a library?
A atiaust Active Member Licensed User Longtime User May 22, 2016 #3 Erel said: The source code of all internal libraries is available in the installation folder. Why do you need to create a library? Click to expand... 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 said: The source code of all internal libraries is available in the installation folder. Why do you need to create a library? Click to expand... 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 May 22, 2016 #4 atiaust said: Your explanation in "Creating Libraries for B4R" is good but a little daunting for those of us with very little C, C++ experience. Click to expand... 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/
atiaust said: Your explanation in "Creating Libraries for B4R" is good but a little daunting for those of us with very little C, C++ experience. Click to expand... 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/