diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6d68606 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,67 @@ +# Continuous Integration (CI) is the practice, in software +# engineering, of merging all developer working copies with a shared mainline +# several times a day < http://docs.platformio.org/page/ci/index.html > +# +# Documentation: +# +# * Travis CI Embedded Builds with PlatformIO +# < https://docs.travis-ci.com/user/integration/platformio/ > +# +# * PlatformIO integration with Travis CI +# < http://docs.platformio.org/page/ci/travis.html > +# +# * User Guide for `platformio ci` command +# < http://docs.platformio.org/page/userguide/cmd_ci.html > +# +# +# Please choice one of the following templates (proposed below) and uncomment +# it (remove "# " before each line) or use own configuration according to the +# Travis CI documentation (see above). +# + + +# +# Template #1: General project. Test it using existing `platformio.ini`. +# + +# language: python +# python: +# - "2.7" +# +# sudo: false +# cache: +# directories: +# - "~/.platformio" +# +# install: +# - pip install -U platformio +# +# script: +# - platformio run + + +# +# Template #2: The project is intended to by used as a library with examples +# + +language: python +python: + - "2.7" + +sudo: false +cache: + directories: + - "~/.platformio" + +env: + - PLATFORMIO_CI_SRC=examples/main.cpp + +install: + - pip install -U platformio + +script: + - platformio ci --lib="." "examples/SimpleTouch" --board=esp01 + - platformio ci --lib="." "examples/GPIOinverter" --board=esp01 + - platformio ci --lib="." "examples/LEDfade" --board=esp01 + - platformio ci --lib="." "examples/DataStream" --board=esp01 + diff --git a/MPR121/Examples/DataStream/DataStream.ino b/examples/DataStream/DataStream.ino similarity index 100% rename from MPR121/Examples/DataStream/DataStream.ino rename to examples/DataStream/DataStream.ino diff --git a/MPR121/Examples/DataStream/readme.md b/examples/DataStream/readme.md similarity index 100% rename from MPR121/Examples/DataStream/readme.md rename to examples/DataStream/readme.md diff --git a/MPR121/Examples/GPIOinverter/GPIOinverter.ino b/examples/GPIOinverter/GPIOinverter.ino similarity index 100% rename from MPR121/Examples/GPIOinverter/GPIOinverter.ino rename to examples/GPIOinverter/GPIOinverter.ino diff --git a/MPR121/Examples/GPIOinverter/readme.md b/examples/GPIOinverter/readme.md similarity index 100% rename from MPR121/Examples/GPIOinverter/readme.md rename to examples/GPIOinverter/readme.md diff --git a/MPR121/Examples/LEDfade/LEDfade.ino b/examples/LEDfade/LEDfade.ino similarity index 100% rename from MPR121/Examples/LEDfade/LEDfade.ino rename to examples/LEDfade/LEDfade.ino diff --git a/MPR121/Examples/LEDfade/readme.md b/examples/LEDfade/readme.md similarity index 100% rename from MPR121/Examples/LEDfade/readme.md rename to examples/LEDfade/readme.md diff --git a/MPR121/Examples/SimpleTouch/SimpleTouch.ino b/examples/SimpleTouch/SimpleTouch.ino similarity index 100% rename from MPR121/Examples/SimpleTouch/SimpleTouch.ino rename to examples/SimpleTouch/SimpleTouch.ino diff --git a/MPR121/Examples/SimpleTouch/readme.md b/examples/SimpleTouch/readme.md similarity index 100% rename from MPR121/Examples/SimpleTouch/readme.md rename to examples/SimpleTouch/readme.md diff --git a/library.json b/library.json new file mode 100644 index 0000000..8c8e306 --- /dev/null +++ b/library.json @@ -0,0 +1,12 @@ +{ + "name": "MPR121", + "version": "1.0.0", + "keywords": "MPR121, Touch, I2C", + "description": "Library for the MPR121 touch controller", + "repository": { + "type": "git", + "url": "https://github.com/BareConductive/mpr121" + }, + "frameworks": "arduino", + "platforms": "espressif8266" +} diff --git a/MPR121/MPR121.cpp b/src/MPR121.cpp similarity index 99% rename from MPR121/MPR121.cpp rename to src/MPR121.cpp index 3b89606..a4dc732 100644 --- a/MPR121/MPR121.cpp +++ b/src/MPR121.cpp @@ -50,7 +50,6 @@ extern "C" { #define OUT_OF_RANGE_BIT 4 MPR121_t::MPR121_t(){ - Wire.begin(); address = 0x5C; // default address is 0x5C, for use with Bare Touch Board ECR_backup = 0x00; running = false; @@ -676,4 +675,4 @@ void MPR121_t::setSamplePeriod(mpr121_sample_interval_t period){ setRegister(MPR121_AFE2, (scratch & 0xF8) | (period & 0x07)); } -MPR121_t MPR121 = MPR121_t(); \ No newline at end of file +MPR121_t MPR121 = MPR121_t(); diff --git a/MPR121/MPR121.h b/src/MPR121.h similarity index 100% rename from MPR121/MPR121.h rename to src/MPR121.h diff --git a/MPR121/MPR121_defs.h b/src/MPR121_defs.h similarity index 100% rename from MPR121/MPR121_defs.h rename to src/MPR121_defs.h diff --git a/MPR121/keywords.txt b/src/keywords.txt similarity index 100% rename from MPR121/keywords.txt rename to src/keywords.txt