From 75428aeba982b2e73a878a50cbd3afac7892b4bb Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 8 Sep 2018 23:16:37 -0700 Subject: [PATCH] Make the libraries compatible with the Arduino IDE - Add library.properties files. These are required for the Arduino IDE to recognize libraries in the 1.5 format (source files under the src folder). - Move keywords.txt files to the root of the library folders. The Arduino IDE will not recognize keywords.txt files under the src folder. - Move example sketches to appropriately named folders. The Arduino IDE requires that sketches be in a folder of the same name. This change causes the examples to be accessible via the File > Examples > LIBRARYNAME menu after installing the library. - Update installation instructions. --- .travis.yml | 2 +- Hbridge/examples/{ => AnalogHBridge}/AnalogHBridge.pde | 0 Hbridge/examples/{ => SimpleHBridge}/SimpleHBridge.pde | 0 Hbridge/{src => }/keywords.txt | 0 Hbridge/library.properties | 10 ++++++++++ .../examples/{ => LineChecker}/LineChecker.pde | 0 .../examples/{ => LineRunner}/LineRunner.pde | 0 LineController/{src => }/keywords.txt | 0 LineController/library.properties | 10 ++++++++++ README.md | 9 ++++----- 10 files changed, 25 insertions(+), 6 deletions(-) rename Hbridge/examples/{ => AnalogHBridge}/AnalogHBridge.pde (100%) rename Hbridge/examples/{ => SimpleHBridge}/SimpleHBridge.pde (100%) rename Hbridge/{src => }/keywords.txt (100%) create mode 100644 Hbridge/library.properties rename LineController/examples/{ => LineChecker}/LineChecker.pde (100%) rename LineController/examples/{ => LineRunner}/LineRunner.pde (100%) rename LineController/{src => }/keywords.txt (100%) create mode 100644 LineController/library.properties diff --git a/.travis.yml b/.travis.yml index 17fb71f..a6ad07c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ - "~/.platformio" env: - - PLATFORMIO_CI_SRC=LineController/examples/LineChecker.pde + - PLATFORMIO_CI_SRC=LineController/examples/LineChecker/LineChecker.pde # - PLATFORMIO_CI_SRC=examples/file.ino # - PLATFORMIO_CI_SRC=path/to/test/directory diff --git a/Hbridge/examples/AnalogHBridge.pde b/Hbridge/examples/AnalogHBridge/AnalogHBridge.pde similarity index 100% rename from Hbridge/examples/AnalogHBridge.pde rename to Hbridge/examples/AnalogHBridge/AnalogHBridge.pde diff --git a/Hbridge/examples/SimpleHBridge.pde b/Hbridge/examples/SimpleHBridge/SimpleHBridge.pde similarity index 100% rename from Hbridge/examples/SimpleHBridge.pde rename to Hbridge/examples/SimpleHBridge/SimpleHBridge.pde diff --git a/Hbridge/src/keywords.txt b/Hbridge/keywords.txt similarity index 100% rename from Hbridge/src/keywords.txt rename to Hbridge/keywords.txt diff --git a/Hbridge/library.properties b/Hbridge/library.properties new file mode 100644 index 0000000..de11a45 --- /dev/null +++ b/Hbridge/library.properties @@ -0,0 +1,10 @@ +name=Hbridge +version=0.0.1 +author=Daniel P. Poltronieri +maintainer=Daniel P. Poltronieri +sentence=Control the L293D IC and boards based on it. +paragraph= +category=Device Control +url=https://github.com/dpoltronieri/Arduino +architectures=* +includes=HBridge.hpp diff --git a/LineController/examples/LineChecker.pde b/LineController/examples/LineChecker/LineChecker.pde similarity index 100% rename from LineController/examples/LineChecker.pde rename to LineController/examples/LineChecker/LineChecker.pde diff --git a/LineController/examples/LineRunner.pde b/LineController/examples/LineRunner/LineRunner.pde similarity index 100% rename from LineController/examples/LineRunner.pde rename to LineController/examples/LineRunner/LineRunner.pde diff --git a/LineController/src/keywords.txt b/LineController/keywords.txt similarity index 100% rename from LineController/src/keywords.txt rename to LineController/keywords.txt diff --git a/LineController/library.properties b/LineController/library.properties new file mode 100644 index 0000000..49344ea --- /dev/null +++ b/LineController/library.properties @@ -0,0 +1,10 @@ +name=LineController +version=0.0.1 +author=Daniel P. Poltronieri +maintainer=Daniel P. Poltronieri +sentence=Use digital line tracking sensors. +paragraph= +category=Sensors +url=https://github.com/dpoltronieri/Arduino +architectures=* +includes=LineController.hpp diff --git a/README.md b/README.md index 023d888..a906c9c 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,10 @@ These libraries were initially created for the discipline Programming Languages ## Install More information can be found in https://www.arduino.cc/en/Guide/Libraries -#### Windows -Copy the desired library to `Libraries` inside the `Arduino` folder in `My Documents`. - -#### Linux -Copy the desired library to `Libraries` inside the Arduino IDE instalation folder. +#### Arduino IDE +1. Download the libraries: https://github.com/dpoltronieri/Arduino/archive/master.zip +2. Unzip the downloaded file. +3. (In the Arduino IDE) Sketch > Include Library > Add .ZIP Library > Select the library you want to install from the unzipped `Arduino-master` folder. > Open #### Atom Copy the desired library to the `Lib` folder in the compilation directory.