Skip to content

Commit

Permalink
Added GPIO20 option.
Browse files Browse the repository at this point in the history
  • Loading branch information
s5uishida committed Sep 12, 2019
1 parent ba754a8 commit 699513f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: java driver for ppd42ns - dust sensor module
Bundle-SymbolicName: ppd42ns-driver
Bundle-Version: 0.1.3
Bundle-Version: 0.1.4
Automatic-Module-Name: ppd42ns-driver
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.pi4j.io.gpio;version="1.2.0",
com.pi4j.io.gpio.event;version="1.2.0",
org.slf4j;version="[1.7.25,1.8.0)"
Export-Package: io.github.s5uishida.iot.device.ppd42ns.driver;version="0.1.3"
Export-Package: io.github.s5uishida.iot.device.ppd42ns.driver;version="0.1.4"
Bundle-Vendor: Shigeru Ishida (s5uishida)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ for gpio communication in java and have confirmed that it works in Raspberry Pi
- [GPIO of Raspberry Pi 3B](https://www.raspberrypi.org/documentation/usage/gpio/README.md)
- Vin --> (2) or (4)
- GND --> (6), (9), (14), (20), (25), (30), (34) or (39)
- Tx --> (19) GPIO10 or (8) GPIO14
- Tx --> (19) GPIO10, (38) GPIO20 or (8) GPIO14

## Install Raspbian Buster Lite OS (2019-07-10)
The reason for using this version is that it is the latest as of July 2019 and [BlueZ](http://www.bluez.org/) 5.50 is included from the beginning, and use Bluetooth and serial communication simultaneously.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ synchronized public static PPD42NSDriver getInstance(Pin gpioPin) {
}

private PPD42NSDriver(Pin gpioPin) {
if (gpioPin.equals(RaspiPin.GPIO_10) || gpioPin.equals(RaspiPin.GPIO_14)) {
if (gpioPin.equals(RaspiPin.GPIO_10) || gpioPin.equals(RaspiPin.GPIO_20) || gpioPin.equals(RaspiPin.GPIO_14)) {
this.gpioPin = gpioPin;
} else {
throw new IllegalArgumentException("The set " + getName(gpioPin) + " is not " +
getName(RaspiPin.GPIO_10) + " or " +
getName(RaspiPin.GPIO_14) + ".");
getName(RaspiPin.GPIO_10) + ", " +
getName(RaspiPin.GPIO_20) + " or " +
getName(RaspiPin.GPIO_14) + ".");
}
logPrefix = "[" + getName() + "] ";
GpioFactory.setDefaultProvider(new RaspiGpioProvider(RaspiPinNumberingScheme.BROADCOM_PIN_NUMBERING));
Expand Down

0 comments on commit 699513f

Please sign in to comment.