0

I am new to creating a library in Arduino. I was able to create a library from YouTube. I want to merge two other libraries into the library I created. Can you please help me to do so?

I already created a keywords.txt file for my library but the keywords are not getting highlighted in orange in the IDE. But it identifies as keywords.

Please guide me how to properly create a keywords file and merge the libraries.

Keywords below:

# -----------------------------------------------------------------------------------
# Syntax coloring for IotBlueEmon library
# -----------------------------------------------------------------------------------
# Datatypes (such as objects)
CurrentSense KEYWORD1
#Methods / functions
begin KEYWORD2
Counter1 KEYWORD2
Counter2 KEYWORD2
counter3 KEYWORD2
getCNT1 KEYWORD2
getCNT2 KEYWORD2
getCNT3 KEYWORD2
# Constants
dda
1,5951 gold badge12 silver badges17 bronze badges
asked Jan 5, 2018 at 6:16
1
  • 1
    please delete the comment. it clutters up the post. you have added it correctly to the question. (there is a little red X next to the comment. it shows up when you hover the mouse pointer over the comment) Commented Jan 5, 2018 at 7:31

1 Answer 1

1

If you consult the Arduino Library Specification's section on keywords.txt:

A tab should be used to separate each name from the KEYWORD1/Keyword2/Literal1 identifier.

A true tab character is required, rather than spaces, as you have in your keywords.txt. It is common for text editors to be configured to add a given number of spaces when the tab key is pressed rather than a true tab character. That's great but in this case you will need to be sure that the tab character is used.

Note that the tab requirement will be relaxed in the Arduino IDE 1.9.0 release, which will also accept space(s) as a keywords separator but it's still best to use tabs for backwards compatibility since people will be using pre-1.9.0 IDE versions for years to come.

answered Jan 5, 2018 at 7:07

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.