Giter Club home page Giter Club logo

arduion_library_creation_guide's Introduction

Arduion_library_creation_guide

This repo will tell you how to create your own custom library.

  1. Open your arduion ide and create a normal ino file as you do for your projects.

    • add a .h and .cpp file to it by using (...) 3 dots which located at Right hand top corner under serial monitor. image
    • name it whatever you want in my case TestLib.h and TestLib.cpp image
    • in .h file create ifndef loop to check whetere your lib pre existed or not and name it whever you want. image
    • now if you seed in my example code TestLib.h file we are checknig arduion version and define the lib.
    • creating a class to hold your variables.
    • ending the class with (;). image
    • ending the #ifndef by #endif
  2. Code in .cpp file

    • you write you logic in .cpp file what operation you have to perform in my case it's additon.
    • you have to initialize the TestLib.h in .cpp file you created Like #include "TestLib.h" image
    • To call the members of calls will be like this TestLib:: .
    • In my case I'm creating a int called sum which will return addition of the two Varriables.
  3. calling the lib in main code

    • initialize the lib by #include "TestLib.h" image
    • declared the type as TestLib and it's name what you want to use in your code.
    • passing 2 int to call like this testlib.sum(1,2); testlib what we declared, sum is a function will return additon of two numbers.
  4. creation of keywords.txt

    • this file is helpful to colour the syntax in ide by defining it's grade
    1. KEYWORD1
    2. KEYWORD2
    • Are the examples
  5. you can put the 3 file .h .cpp .txt in arduion library files by creating name of folder TestLib

6. take a look at comment you will understand the code easily than steps.

arduion_library_creation_guide's People

Contributors

refreshmymind-i avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

arduion_library_creation_guide's Issues

library.properties file

Great Start

This repo is a great start, i would add a library.properties file to the repo to complete the tutorial.

Secondly, but not required, i would smarten up the md it's pretty hard to follow as it is now. :)

Keep it up!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.