Skip to content

Commit

Permalink
Bumped build dependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjlewis committed Apr 3, 2018
1 parent 19ce56b commit b8dcefd
Show file tree
Hide file tree
Showing 24 changed files with 105 additions and 188 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 - 2017, mattjlewis
Copyright (c) 2016 - 2018, mattjlewis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Build Status](https://travis-ci.org/mattjlewis/diozero.svg?branch=master)](https://travis-ci.org/mattjlewis/diozero)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.diozero/diozero/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.diozero/diozero)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Javadoc](https://javadoc-emblem.rhcloud.com/doc/com.diozero/diozero/badge.svg)](http://www.javadoc.io/doc/com.diozero/diozero)
[![Javadoc](https://javadoc-emblem.rhcloud.com/doc/com.diozero/diozero-core/badge.svg)](http://www.javadoc.io/doc/com.diozero/diozero-core)
[![Documentation Status](https://readthedocs.org/projects/diozero/badge/?version=latest)](http://diozero.readthedocs.io/en/latest/?badge=latest)

A Device I/O library written in Java that provides an object-orientated interface for a range of
Expand All @@ -20,7 +20,7 @@ This library makes use of modern Java features such as
[Method References](https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html)
where they simplify development and improve code readability.

Created by [Matt Lewis](https://github.com/mattjlewis) (email [deviceiozero@gmail.com](mailto:deviceiozero@gmail.com)),
Created by [Matt Lewis](https://github.com/mattjlewis) (email [deviceiozero@gmail.com](mailto:deviceiozero@gmail.com)) ([blog](https://diozero.blogspot.co.uk/)),
inspired by [GPIO Zero](https://gpiozero.readthedocs.org/) and [Johnny Five](http://johnny-five.io/).
If you have any issues please use the [GitHub issues page](https://github.com/mattjlewis/diozero/issues).
For any other comments or suggestions, please use the [diozero Google Group](https://groups.google.com/forum/#!forum/diozero).
Expand Down Expand Up @@ -299,10 +299,13 @@ This project is hosted on [GitHub](https://github.com/mattjlewis/diozero/), plea
+ Thorough testing (various types of devices using each service provider)
+ A clean object-orientated API for IMUs
+ Native support for all devices via mmap (/dev/mem), in particular to improve performance and add support for GPIO pull up/down configuration.
+ Cleanup the logic for handling capabilities of different boards in a generic fashion (no more if / then / else)
+ Firmata SPI support (via USB cable)
+ Wireless access to Firmata devices (network and Bluetooth). E.g. [ESP32](https://learn.sparkfun.com/tutorials/esp32-thing-hookup-guide?_ga=1.116824388.33505106.1471290985#installing-the-esp32-arduino-core) [Firmata GitHub issue #315](https://github.com/firmata/arduino/issues/315)
+ Particle Photon support (via wifi using [VoodooSpark "firmware"](https://github.com/voodootikigod/voodoospark) - [JavaScript implementation](https://github.com/rwaldron/particle-io/blob/master/lib/particle.js))
+ Remote API for board capabilities
+ SPI support for Arduino devices
+ Introduce Servo as a device type
+ Try out ConfigurableFirmata - is there actually any difference to the StandardFirmata protocol?
+ Complete ADSL1x15
+ BME680

[Release History](docs/RELEASE.md)

Expand Down
13 changes: 8 additions & 5 deletions diozero-core/src/main/java/com/diozero/devices/Keypad.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,20 @@
import java.util.ArrayList;
import java.util.List;

import org.pmw.tinylog.Logger;

import com.diozero.api.DigitalInputDevice;
import com.diozero.api.DigitalOutputDevice;
import com.diozero.api.GpioEventTrigger;
import com.diozero.api.GpioPullUpDown;
import com.diozero.util.SleepUtil;

/**
* http://www.instructables.com/id/Connecting-a-4-x-4-Membrane-Keypad-to-an-Arduino/
* https://github.com/Chris--A/Keypad/tree/master/src
* <p>References:</p>
* <ul>
* <li><a href="http://www.instructables.com/id/Connecting-a-4-x-4-Membrane-Keypad-to-an-Arduino/">Connecting a 4x4 Membrane Keypad to an Arduino</a></li>
* <li><a href="https://github.com/Chris--A/Keypad/tree/master/src">Arduino source code</a></li>
* </ul>
* <p>Note, this class should be run with the mmap provider as it configures input pull-up registers,
* something that cannot be done with the sysfs provider unfortunately. You can of course wire it up
* with your own pull-up resistors.</p>
*/
public class Keypad {
public static final char NO_KEY = '\0';
Expand Down
2 changes: 1 addition & 1 deletion diozero-core/src/main/resources/tinylog.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ tinylog.writer = console
tinylog.format = {date:HH:mm:ss.SSS} [{thread}] {level} {class}.{method} - {message}
tinylog.level = info
tinylog.level@com.diozero = debug
tinylog.level@com.diozero.internal = info
#tinylog.level@com.diozero.internal = debug
#tinylog.level@com.diozero.rfid = debug
#tinylog.level@com.diozero.sandpit = debug
2 changes: 1 addition & 1 deletion diozero-provider-firmata/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 - 2017, mattjlewis
Copyright (c) 2016 - 2018, mattjlewis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion diozero-provider-firmata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<packaging>jar</packaging>

<properties>
<firmata4j.version>2.3.5</firmata4j.version>
<firmata4j.version>2.3.6</firmata4j.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion diozero-provider-remote/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 - 2017, mattjlewis
Copyright (c) 2016 - 2018, mattjlewis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions diozero-provider-remote/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

<properties>
<eclipse-paho-client-mqttv3.version>1.2.0</eclipse-paho-client-mqttv3.version>
<google-protocol-buffers.version>3.4.0</google-protocol-buffers.version>
<apache-httpcomponents-httpcore.version>4.4.8</apache-httpcomponents-httpcore.version>
<apache-httpcomponents-httpclient.version>4.5.3</apache-httpcomponents-httpclient.version>
<google-protocol-buffers.version>3.5.1</google-protocol-buffers.version>
<apache-httpcomponents-httpcore.version>4.4.9</apache-httpcomponents-httpcore.version>
<apache-httpcomponents-httpclient.version>4.5.5</apache-httpcomponents-httpclient.version>
<netty.version>4.1.16.Final</netty.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public GpioAnalogReadResponse request(GpioAnalogRead request) {
@Override
public Response request(GpioAnalogWrite request) {
try {
// Firmata doesn't support analog output, ue PWM instead
// Firmata doesn't support analog output, use PWM instead
adapter.setValue(request.getGpio(),
RangeUtil.map(request.getValue(), 0f, 1f, 0, adapter.getMax(request.getGpio(), PinMode.PWM), true));
} catch (IOException e) {
Expand Down
2 changes: 1 addition & 1 deletion diozero-remote-server/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 - 2017, mattjlewis
Copyright (c) 2016 - 2018, mattjlewis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
33 changes: 31 additions & 2 deletions diozero-remote-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,18 @@
<properties>
<eclipse-paho-client-mqttv3.version>1.2.0</eclipse-paho-client-mqttv3.version>
<google-gson.version>2.8.2</google-gson.version>
<google-protocol-buffers.version>3.4.0</google-protocol-buffers.version>
<sparkjava-core.version>2.6.0</sparkjava-core.version>
<google-protocol-buffers.version>3.5.1</google-protocol-buffers.version>
<sparkjava-core.version>2.7.2</sparkjava-core.version>
</properties>

<repositories>
<!-- Needed for JSON-B API -->
<repository>
<id>java.net-Public</id>
<name>Maven Java Net Snapshots and Releases</name>
<url>https://maven.java.net/content/groups/public/</url>
</repository>
</repositories>

<dependencies>
<dependency>
Expand All @@ -44,5 +53,25 @@
<artifactId>protobuf-java</artifactId>
<version>${google-protocol-buffers.version}</version>
</dependency>

<!-- Testing JSON-B -->
<dependency>
<groupId>javax.json.bind</groupId>
<artifactId>javax.json.bind-api</artifactId>
<version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>yasson</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
30 changes: 0 additions & 30 deletions diozero-sampleapps/src/main/resources/animation1.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
/*
* #%L
* Organisation: mattjlewis
* Project: Device I/O Zero - Sample applications
* Filename: animation1.json
*
* This file is part of the diozero project. More information about this project
* can be found at http://www.diozero.com/
* %%
* Copyright (C) 2016 - 2017 mattjlewis
* %%
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* #L%
*/
{
"durationMillis": 2000,
"cuePoints": [0, 0.2, 0.8, 1],
Expand Down
30 changes: 0 additions & 30 deletions diozero-sampleapps/src/main/resources/animation2.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
/*
* #%L
* Organisation: mattjlewis
* Project: Device I/O Zero - Sample applications
* Filename: animation2.json
*
* This file is part of the diozero project. More information about this project
* can be found at http://www.diozero.com/
* %%
* Copyright (C) 2016 - 2017 mattjlewis
* %%
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* #L%
*/
{
"durationMillis": 2000,
"cuePoints": [0, 0.5, 1.0],
Expand Down
30 changes: 0 additions & 30 deletions diozero-sampleapps/src/main/resources/animation3.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
/*
* #%L
* Organisation: mattjlewis
* Project: Device I/O Zero - Sample applications
* Filename: animation3.json
*
* This file is part of the diozero project. More information about this project
* can be found at http://www.diozero.com/
* %%
* Copyright (C) 2016 - 2017 mattjlewis
* %%
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* #L%
*/
{
"durationMillis": 2000,
"cuePoints": [0, 0.2, 0.8, 1],
Expand Down
30 changes: 0 additions & 30 deletions diozero-sampleapps/src/main/resources/animation4.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
/*
* #%L
* Organisation: mattjlewis
* Project: Device I/O Zero - Sample applications
* Filename: animation4.json
*
* This file is part of the diozero project. More information about this project
* can be found at http://www.diozero.com/
* %%
* Copyright (C) 2016 - 2017 mattjlewis
* %%
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* #L%
*/
{
"durationMillis": 2000,
"cuePoints": [0, 0.25, 0.5, 0.75, 1.0],
Expand Down
2 changes: 1 addition & 1 deletion diozero-webapp/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 - 2017, mattjlewis
Copyright (c) 2016 - 2018, mattjlewis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion diozero-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<packaging>jar</packaging>

<properties>
<sparkjava.version>2.5.5</sparkjava.version>
<sparkjava.version>2.7.1</sparkjava.version>
<slf4j.version>1.7.25</slf4j.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ public enum StripType {
// GND Pin 6 (GND) -V or COM

// 4 colour R, G, B and W ordering
SK6812_STRIP_RGBW(3, 2, 1, 0),
SK6812_STRIP_RBGW(3, 2, 0, 1),
SK6812_STRIP_GRBW(3, 1, 2, 0),
SK6812_STRIP_GBRW(3, 1, 0, 2),
SK6812_STRIP_BRGW(3, 0, 2, 1),
SK6812_STRIP_BGRW(3, 0, 1, 2),
SK6812_RGBW(3, 2, 1, 0),
SK6812_RBGW(3, 2, 0, 1),
SK6812_GRBW(3, 1, 2, 0),
SK6812_GBRW(3, 1, 0, 2),
SK6812_BRGW(3, 0, 2, 1),
SK6812_BGRW(3, 0, 1, 2),

// 3 colour R, G and B ordering
WS2811_STRIP_RGB(2, 1, 0),
WS2811_STRIP_RBG(2, 0, 1),
WS2811_STRIP_GRB(1, 2, 0),
WS2811_STRIP_GBR(1, 0, 2),
WS2811_STRIP_BRG(0, 2, 1),
WS2811_STRIP_BGR(0, 1, 2);
WS2811_RGB(2, 1, 0),
WS2811_RBG(2, 0, 1),
WS2811_GRB(1, 2, 0),
WS2811_GBR(1, 0, 2),
WS2811_BRG(0, 2, 1),
WS2811_BGR(0, 1, 2);

private int whiteShift;
private int redShift;
Expand Down Expand Up @@ -110,7 +110,7 @@ public int getColourCount() {
}

// Predefined fixed LED types
public static final StripType WS2812_STRIP = WS2811_STRIP_GRB;
public static final StripType SK6812_STRIP = WS2811_STRIP_GRB;
public static final StripType SK6812W_STRIP = SK6812_STRIP_GRBW;
public static final StripType WS2812 = WS2811_GRB;
public static final StripType SK6812 = WS2811_GRB;
public static final StripType SK6812W = SK6812_GRBW;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

/**
* Reference: https://cpldcpu.com/2014/11/30/understanding-the-apa102-superled/
* Also: https://github.com/androidthings/contrib-drivers/blob/master/apa102/src/main/java/com/google/android/things/contrib/driver/apa102/Apa102.java
*/
public class Apa102LedDriver implements LedDriverInterface {
private SpiDevice device;
Expand Down
Loading

0 comments on commit b8dcefd

Please sign in to comment.