Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for platformio and travis-ci #8

Open
wants to merge 3 commits into
base: public
Choose a base branch
from

Conversation

euphi
Copy link

@euphi euphi commented Dec 8, 2017

I changed the directory structure (rename MPR121 subdir to src and moved examples to root directory), so the the repository is now compatible with platformio.

It is not yet registered, but also possible to reference it in platformio projects by its full git path (see https://github.com/euphi/ESP-Touch/tree/Display_WS2812 for example).

I also created a library.json file, so you can easily register it at platformio. Note, that this is untested, because I don't want to register my fork at platformio, but this would be necessary to test it.

I also added a .travis.yml to use the CI service on travis-ci to build all the examples - see https://travis-ci.org/euphi/mpr121/builds/313616941 .

@per1234
Copy link

per1234 commented Dec 19, 2017

As it currently stands, this change will cause the library to no longer be considered a valid library by the Arduino IDE. The Arduino IDE requires that a library either contains a header file in the root folder (1.0 library format) or that it contains a library.properties file in the root folder (1.5 library format). You can find the specification for the library.properties file here;
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format

After that change is made this PR will have the added benefit of allowing the library to be installed in the Arduino via the popular "Sketch > Include Library > Add .ZIP Library" installation method, which requires that the library be located in the root of the repository. It also opens the possibility for the library to be added to the Arduino Library Manager index, which also has that requirement.

The change to the 1.5 library format (library source files in the src subfolder) will break backwards compatibility with Arduino IDE 1.0.x. Whether that's considered a serious issue is up to the library author to decide.

@stefandz
Copy link
Contributor

Hi both. Thanks for your contributions. We'll review this in the new year!

Wire.begin() must not be called in ctor, because Wire may not be
constructed yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants