├── .bashrc
├── .gitattributes
├── .github
└── workflows
│ └── crosscompiling.yml
├── .gitignore
├── BUILD.md
├── LICENSE.txt
├── NOTICE.txt
├── README.md
├── build-docker.sh
├── pi4j-core
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── pi4j
│ │ ├── concurrent
│ │ ├── DefaultExecutorServiceFactory.java
│ │ ├── ExecutorServiceFactory.java
│ │ ├── ScheduledExecutorServiceWrapper.java
│ │ ├── ShutdownDisabledExecutorWrapper.java
│ │ └── SingleThreadGpioExecutorServiceFactory.java
│ │ ├── io
│ │ ├── file
│ │ │ ├── FileException.java
│ │ │ └── LinuxFile.java
│ │ ├── gpio
│ │ │ ├── GpioController.java
│ │ │ ├── GpioFactory.java
│ │ │ ├── GpioPin.java
│ │ │ ├── GpioPinAnalog.java
│ │ │ ├── GpioPinAnalogInput.java
│ │ │ ├── GpioPinAnalogOutput.java
│ │ │ ├── GpioPinDigital.java
│ │ │ ├── GpioPinDigitalInput.java
│ │ │ ├── GpioPinDigitalMultipurpose.java
│ │ │ ├── GpioPinDigitalOutput.java
│ │ │ ├── GpioPinInput.java
│ │ │ ├── GpioPinOutput.java
│ │ │ ├── GpioPinPwm.java
│ │ │ ├── GpioPinPwmOutput.java
│ │ │ ├── GpioPinShutdown.java
│ │ │ ├── GpioProvider.java
│ │ │ ├── GpioProviderBase.java
│ │ │ ├── GpioProviderPinCache.java
│ │ │ ├── Pin.java
│ │ │ ├── PinDirection.java
│ │ │ ├── PinEdge.java
│ │ │ ├── PinMode.java
│ │ │ ├── PinProvider.java
│ │ │ ├── PinPullResistance.java
│ │ │ ├── PinState.java
│ │ │ ├── RCMPin.java
│ │ │ ├── RaspiBcmPin.java
│ │ │ ├── RaspiGpioProvider.java
│ │ │ ├── RaspiPin.java
│ │ │ ├── RaspiPinNumberingScheme.java
│ │ │ ├── SimulatedGpioProvider.java
│ │ │ ├── WiringPiGpioProviderBase.java
│ │ │ ├── event
│ │ │ │ ├── GpioPinAnalogValueChangeEvent.java
│ │ │ │ ├── GpioPinDigitalStateChangeEvent.java
│ │ │ │ ├── GpioPinEvent.java
│ │ │ │ ├── GpioPinListener.java
│ │ │ │ ├── GpioPinListenerAnalog.java
│ │ │ │ ├── GpioPinListenerDigital.java
│ │ │ │ ├── IFTTTMakerChannelTriggerEvent.java
│ │ │ │ ├── IFTTTMakerChannelTriggerListener.java
│ │ │ │ ├── PinAnalogValueChangeEvent.java
│ │ │ │ ├── PinDigitalStateChangeEvent.java
│ │ │ │ ├── PinEvent.java
│ │ │ │ ├── PinEventType.java
│ │ │ │ └── PinListener.java
│ │ │ ├── exception
│ │ │ │ ├── GpioPinExistsException.java
│ │ │ │ ├── GpioPinNotProvisionedException.java
│ │ │ │ ├── InvalidPinException.java
│ │ │ │ ├── InvalidPinModeException.java
│ │ │ │ ├── PinProviderException.java
│ │ │ │ ├── UnsupportedBoardType.java
│ │ │ │ ├── UnsupportedPinEventsException.java
│ │ │ │ ├── UnsupportedPinModeException.java
│ │ │ │ ├── UnsupportedPinPullResistanceException.java
│ │ │ │ └── ValidationException.java
│ │ │ ├── impl
│ │ │ │ ├── GpioControllerImpl.java
│ │ │ │ ├── GpioEventMonitorExecutorImpl.java
│ │ │ │ ├── GpioEventMonitorImpl.java
│ │ │ │ ├── GpioPinImpl.java
│ │ │ │ ├── GpioPinShutdownImpl.java
│ │ │ │ ├── GpioScheduledExecutorImpl.java
│ │ │ │ └── PinImpl.java
│ │ │ ├── tasks
│ │ │ │ └── impl
│ │ │ │ │ ├── GpioBlinkStopTaskImpl.java
│ │ │ │ │ ├── GpioBlinkTaskImpl.java
│ │ │ │ │ ├── GpioEventDebounceTaskImpl.java
│ │ │ │ │ ├── GpioEventDispatchTaskImpl.java
│ │ │ │ │ └── GpioPulseTaskImpl.java
│ │ │ └── trigger
│ │ │ │ ├── GpioBlinkStateTrigger.java
│ │ │ │ ├── GpioBlinkStopStateTrigger.java
│ │ │ │ ├── GpioCallbackTrigger.java
│ │ │ │ ├── GpioInverseSyncStateTrigger.java
│ │ │ │ ├── GpioPulseStateTrigger.java
│ │ │ │ ├── GpioSetStateTrigger.java
│ │ │ │ ├── GpioSyncStateTrigger.java
│ │ │ │ ├── GpioToggleStateTrigger.java
│ │ │ │ ├── GpioTrigger.java
│ │ │ │ ├── GpioTriggerBase.java
│ │ │ │ ├── IFTTTMakerChannelTrigger.java
│ │ │ │ └── OutputTargetedGpioTrigger.java
│ │ ├── i2c
│ │ │ ├── I2CBus.java
│ │ │ ├── I2CConstants.java
│ │ │ ├── I2CDevice.java
│ │ │ ├── I2CFactory.java
│ │ │ ├── I2CFactoryProvider.java
│ │ │ └── impl
│ │ │ │ ├── I2CBusImpl.java
│ │ │ │ ├── I2CDeviceImpl.java
│ │ │ │ └── I2CProviderImpl.java
│ │ ├── serial
│ │ │ ├── Baud.java
│ │ │ ├── DataBits.java
│ │ │ ├── FlowControl.java
│ │ │ ├── Parity.java
│ │ │ ├── RaspberryPiSerial.java
│ │ │ ├── Serial.java
│ │ │ ├── SerialConfig.java
│ │ │ ├── SerialDataEvent.java
│ │ │ ├── SerialDataEventListener.java
│ │ │ ├── SerialDataReader.java
│ │ │ ├── SerialDataWriter.java
│ │ │ ├── SerialFactory.java
│ │ │ ├── SerialPort.java
│ │ │ ├── SerialPortException.java
│ │ │ ├── StopBits.java
│ │ │ ├── impl
│ │ │ │ ├── AbstractSerialDataReader.java
│ │ │ │ ├── AbstractSerialDataReaderWriter.java
│ │ │ │ ├── AbstractSerialDataWriter.java
│ │ │ │ ├── SerialByteBuffer.java
│ │ │ │ └── SerialImpl.java
│ │ │ └── tasks
│ │ │ │ └── SerialDataEventDispatchTaskImpl.java
│ │ ├── spi
│ │ │ ├── SpiChannel.java
│ │ │ ├── SpiDevice.java
│ │ │ ├── SpiFactory.java
│ │ │ ├── SpiMode.java
│ │ │ └── impl
│ │ │ │ └── SpiDeviceImpl.java
│ │ ├── w1
│ │ │ ├── W1BaseDevice.java
│ │ │ ├── W1Device.java
│ │ │ ├── W1DeviceType.java
│ │ │ ├── W1Master.java
│ │ │ ├── W1MasterWatcher.java
│ │ │ └── package-info.java
│ │ └── wdt
│ │ │ ├── WDTimer.java
│ │ │ └── impl
│ │ │ └── WDTimerImpl.java
│ │ ├── jni
│ │ ├── AnalogInputEvent.java
│ │ ├── AnalogInputListener.java
│ │ ├── AnalogInputMonitor.java
│ │ ├── Serial.java
│ │ ├── SerialInterrupt.java
│ │ ├── SerialInterruptEvent.java
│ │ ├── SerialInterruptListener.java
│ │ └── WDT.java
│ │ ├── platform
│ │ ├── Platform.java
│ │ ├── PlatformAlreadyAssignedException.java
│ │ └── PlatformManager.java
│ │ ├── system
│ │ ├── NetworkInfo.java
│ │ ├── NetworkInterface.java
│ │ ├── SystemInfo.java
│ │ ├── SystemInfoFactory.java
│ │ ├── SystemInfoProvider.java
│ │ └── impl
│ │ │ ├── DefaultSystemInfoProvider.java
│ │ │ ├── RaspiSystemInfoProvider.java
│ │ │ └── SystemInfoProviderBase.java
│ │ ├── temperature
│ │ ├── TemperatureConversion.java
│ │ └── TemperatureScale.java
│ │ ├── util
│ │ ├── CommandArgumentParser.java
│ │ ├── Console.java
│ │ ├── ConsoleColor.java
│ │ ├── ExecUtil.java
│ │ ├── NativeLibraryLoader.java
│ │ └── StringUtil.java
│ │ └── wiringpi
│ │ ├── Gertboard.java
│ │ ├── Gpio.java
│ │ ├── GpioInterrupt.java
│ │ ├── GpioInterruptCallback.java
│ │ ├── GpioInterruptEvent.java
│ │ ├── GpioInterruptListener.java
│ │ ├── GpioUtil.java
│ │ ├── I2C.java
│ │ ├── Lcd.java
│ │ ├── Nes.java
│ │ ├── Serial.java
│ │ ├── Shift.java
│ │ ├── SoftPwm.java
│ │ ├── SoftTone.java
│ │ └── Spi.java
│ └── test
│ ├── java
│ └── com
│ │ └── pi4j
│ │ ├── IntegrationTests.java
│ │ ├── io
│ │ ├── file
│ │ │ └── test
│ │ │ │ ├── ExposedLinuxFile.java
│ │ │ │ ├── LinuxFileIntegrationTest.java
│ │ │ │ └── LinuxFileManualTest.java
│ │ ├── gpio
│ │ │ ├── impl
│ │ │ │ └── GpioControllerImplTest.java
│ │ │ ├── test
│ │ │ │ ├── GpioPinAnalogInputTests.java
│ │ │ │ ├── GpioPinAnalogOutputTests.java
│ │ │ │ ├── GpioPinDigitalInputTests.java
│ │ │ │ ├── GpioPinDigitalOutputTests.java
│ │ │ │ ├── GpioPinPwmOutputTests.java
│ │ │ │ ├── MockGpioFactory.java
│ │ │ │ ├── MockGpioProvider.java
│ │ │ │ └── MockPin.java
│ │ │ └── trigger
│ │ │ │ └── test
│ │ │ │ ├── GpioCallbackTriggerTests.java
│ │ │ │ ├── GpioInverseSyncStateTriggerTests.java
│ │ │ │ ├── GpioPulseStateTriggerTests.java
│ │ │ │ ├── GpioSetStateTriggerTests.java
│ │ │ │ ├── GpioSyncStateTriggerTests.java
│ │ │ │ └── GpioToggleStateTriggerTests.java
│ │ ├── hardware
│ │ │ ├── i2c
│ │ │ │ ├── I2CHardwareTest.ino
│ │ │ │ └── I2CHardwareTest.java
│ │ │ └── spi
│ │ │ │ ├── SpiHardwareTest.ino
│ │ │ │ └── SpiHardwareTest.java
│ │ ├── i2c
│ │ │ └── impl
│ │ │ │ ├── I2CBusImplTest.java
│ │ │ │ └── I2CDeviceImplTest.java
│ │ └── w1
│ │ │ ├── W1DummyDeviceType.java
│ │ │ └── W1MasterTest.java
│ │ ├── temperature
│ │ └── test
│ │ │ └── TemperatureConversionTests.java
│ │ └── util
│ │ └── StringUtilTests.java
│ └── resources
│ ├── META-INF
│ └── services
│ │ └── com.pi4j.io.w1.W1DeviceType
│ └── w1
│ └── sys
│ └── bus
│ └── w1
│ └── devices
│ ├── 28-00000698ebb1
│ ├── name
│ ├── uevent
│ └── w1_slave
│ ├── 28-00000698ebb2
│ ├── name
│ ├── uevent
│ └── w1_slave
│ ├── FE-00000698ebb3
│ ├── name
│ ├── uevent
│ └── w1_slave
│ └── w1_bus_master1
│ └── w1_master_slaves
├── pi4j-distribution
├── .classpath
├── .gitignore
├── .project
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ ├── org.eclipse.jdt.core.prefs
│ └── org.eclipse.m2e.core.prefs
├── pom.xml
└── src
│ ├── assembly
│ └── distribution.xml
│ ├── deb
│ └── control
│ │ ├── control
│ │ ├── postinst
│ │ ├── postrm
│ │ ├── preinst
│ │ └── prerm
│ └── scripts
│ ├── deb-s3
│ ├── install
│ ├── pi4j
│ ├── pi4j.gpg
│ ├── pi4j.list
│ └── uninstall
├── pi4j-example
├── pom.xml
└── src
│ └── main
│ └── java
│ ├── BlinkGpioExample.java
│ ├── BlinkTriggerGpioExample.java
│ ├── BroadcomPinNumberingGpioExample.java
│ ├── BroadcomPinNumberingGpioListenerExample.java
│ ├── ComputeModuleGpioExample.java
│ ├── ControlGpioExample.java
│ ├── CylonGpioExample.java
│ ├── DebounceGpioExample.java
│ ├── FrequencyGpioExample.java
│ ├── GpioInputAllExample.java
│ ├── GpioInputExample.java
│ ├── GpioInputPollingAllExample.java
│ ├── GpioInputPollingExample.java
│ ├── GpioListenAllExample.java
│ ├── GpioListenExample.java
│ ├── GpioOutputAllExample.java
│ ├── GpioOutputExample.java
│ ├── GpioTest.java
│ ├── I2CExample.java
│ ├── IFTTTMakerChannelTriggerExample.java
│ ├── ListenGpioExample.java
│ ├── ListenMultipleGpioExample.java
│ ├── MultipurposePinGpioExample.java
│ ├── NonPrivilegedGpioExample.java
│ ├── PwmExample.java
│ ├── SerialBufferedDataExample.java
│ ├── SerialExample.java
│ ├── ShutdownGpioExample.java
│ ├── SoftPwmExample.java
│ ├── SpiExample.java
│ ├── SystemInfoExample.java
│ ├── TriggerGpioExample.java
│ ├── UsageGpioExample.java
│ ├── WDTExample.java
│ ├── WiringPiGpioExample.java
│ ├── WiringPiGpioInterruptExample.java
│ ├── WiringPiGpioInterruptExample2.java
│ ├── WiringPiLcdExample.java
│ ├── WiringPiPinAltExample.java
│ ├── WiringPiSPIExample.java
│ ├── WiringPiSerialExample.java
│ ├── WiringPiSoftPWMExample.java
│ ├── build
│ └── run
├── pi4j-native
├── .gitignore
├── build.xml
├── pom.xml
└── src
│ └── main
│ └── native
│ ├── Makefile
│ ├── build-docker.sh
│ ├── build-libpi4j.sh
│ ├── build-wiringpi.sh
│ ├── build.sh
│ ├── com_pi4j_io_file_LinuxFile.c
│ ├── com_pi4j_io_file_LinuxFile.h
│ ├── com_pi4j_jni_AnalogInputMonitor.c
│ ├── com_pi4j_jni_AnalogInputMonitor.h
│ ├── com_pi4j_jni_Exception.c
│ ├── com_pi4j_jni_Exception.h
│ ├── com_pi4j_jni_Loader.c
│ ├── com_pi4j_jni_Loader.h
│ ├── com_pi4j_jni_Serial.c
│ ├── com_pi4j_jni_Serial.h
│ ├── com_pi4j_jni_SerialInterrupt.c
│ ├── com_pi4j_jni_SerialInterrupt.h
│ ├── com_pi4j_jni_WDT.c
│ ├── com_pi4j_jni_WDT.h
│ ├── com_pi4j_wiringpi_Gertboard.c
│ ├── com_pi4j_wiringpi_Gertboard.h
│ ├── com_pi4j_wiringpi_Gpio.c
│ ├── com_pi4j_wiringpi_Gpio.h
│ ├── com_pi4j_wiringpi_GpioInterrupt.c
│ ├── com_pi4j_wiringpi_GpioInterrupt.h
│ ├── com_pi4j_wiringpi_GpioPin.c
│ ├── com_pi4j_wiringpi_GpioPin.h
│ ├── com_pi4j_wiringpi_GpioUtil.c
│ ├── com_pi4j_wiringpi_GpioUtil.h
│ ├── com_pi4j_wiringpi_I2C.c
│ ├── com_pi4j_wiringpi_I2C.h
│ ├── com_pi4j_wiringpi_Lcd.c
│ ├── com_pi4j_wiringpi_Lcd.h
│ ├── com_pi4j_wiringpi_Nes.c
│ ├── com_pi4j_wiringpi_Nes.h
│ ├── com_pi4j_wiringpi_Serial.c
│ ├── com_pi4j_wiringpi_Serial.h
│ ├── com_pi4j_wiringpi_Shift.c
│ ├── com_pi4j_wiringpi_Shift.h
│ ├── com_pi4j_wiringpi_SoftPwm.c
│ ├── com_pi4j_wiringpi_SoftPwm.h
│ ├── com_pi4j_wiringpi_SoftTone.c
│ ├── com_pi4j_wiringpi_SoftTone.h
│ ├── com_pi4j_wiringpi_Spi.c
│ ├── com_pi4j_wiringpi_Spi.h
│ └── install-prerequisites.sh
├── pom.xml
└── src
├── license
└── template.ftl
└── site
├── apt
├── articles.apt
├── contact.apt
├── dependency.apt
├── download.apt
├── example
│ ├── control.apt.vm
│ ├── listener.apt.vm
│ ├── more.apt.vm
│ ├── serial.apt.vm
│ ├── shutdown.apt.vm
│ ├── system-info.apt.vm
│ └── trigger.apt.vm
├── index.apt
├── install.apt.vm
├── pin-numbering-scheme.apt
├── pins
│ ├── rpi-1a.apt
│ ├── rpi-1ap.apt
│ ├── rpi-1b-rev1.apt
│ ├── rpi-1b-rev2.apt
│ ├── rpi-1bp.apt
│ ├── rpi-2b.apt
│ ├── rpi-3ap.apt
│ ├── rpi-3b.apt
│ ├── rpi-3bp.apt
│ ├── rpi-400.apt
│ ├── rpi-4b.apt
│ ├── rpi-cm1.apt
│ ├── rpi-cm3.apt
│ ├── rpi-cm3p.apt
│ ├── rpi-cm4.apt
│ ├── rpi-zero.apt
│ └── rpi-zerow.apt
├── release-notes.apt
├── usage.apt
└── utility
│ └── pi4j.apt
├── fml
└── faq.fml
├── resources
├── CNAME
├── android-chrome-144x144.png
├── android-chrome-192x192.png
├── android-chrome-36x36.png
├── android-chrome-48x48.png
├── android-chrome-72x72.png
├── android-chrome-96x96.png
├── apple-touch-icon-114x114.png
├── apple-touch-icon-120x120.png
├── apple-touch-icon-144x144.png
├── apple-touch-icon-152x152.png
├── apple-touch-icon-180x180.png
├── apple-touch-icon-57x57.png
├── apple-touch-icon-60x60.png
├── apple-touch-icon-72x72.png
├── apple-touch-icon-76x76.png
├── apple-touch-icon-precomposed.png
├── apple-touch-icon.png
├── browserconfig.xml
├── favicon-16x16.png
├── favicon-32x32.png
├── favicon-96x96.png
├── favicon.ico
├── images
│ ├── gpio-control-example-large.png
│ ├── gpio-control-example.png
│ ├── gpio-listener-example-large.png
│ ├── gpio-listener-example.png
│ ├── gpio-trigger-example-large.png
│ ├── gpio-trigger-example.png
│ ├── logos
│ │ ├── pi4j-header-small.png
│ │ ├── pi4j-header-small2.png
│ │ ├── pi4j-header-small3.png
│ │ ├── pi4j-header.png
│ │ ├── pi4j-header2.png
│ │ ├── pi4j-logo.png
│ │ ├── pi4j.png
│ │ ├── raspberrypi.png
│ │ └── trademarks.png
│ ├── pi4j-dependencies-small.png
│ ├── pi4j-dependencies.png
│ ├── pi4j-rpi-1a-header.png
│ ├── pi4j-rpi-1a-p5-small.png
│ ├── pi4j-rpi-1a-p5.png
│ ├── pi4j-rpi-1a-pinout-small.png
│ ├── pi4j-rpi-1a-pinout.png
│ ├── pi4j-rpi-1ap-header.png
│ ├── pi4j-rpi-1ap-pinout-small.png
│ ├── pi4j-rpi-1ap-pinout.png
│ ├── pi4j-rpi-1b-p5-small.png
│ ├── pi4j-rpi-1b-p5.png
│ ├── pi4j-rpi-1b-pinout-small.png
│ ├── pi4j-rpi-1b-pinout.png
│ ├── pi4j-rpi-1b-rev1-header.png
│ ├── pi4j-rpi-1b-rev2-header.png
│ ├── pi4j-rpi-1bp-header.png
│ ├── pi4j-rpi-1bp-pinout-small.png
│ ├── pi4j-rpi-1bp-pinout.png
│ ├── pi4j-rpi-2b-header.png
│ ├── pi4j-rpi-2b-pinout-small.png
│ ├── pi4j-rpi-2b-pinout.png
│ ├── pi4j-rpi-3ap-header.png
│ ├── pi4j-rpi-3ap-pinout-small.png
│ ├── pi4j-rpi-3ap-pinout.png
│ ├── pi4j-rpi-3b-header.png
│ ├── pi4j-rpi-3b-pinout-small.png
│ ├── pi4j-rpi-3b-pinout.png
│ ├── pi4j-rpi-3bp-header.png
│ ├── pi4j-rpi-3bp-pinout-small.png
│ ├── pi4j-rpi-3bp-pinout.png
│ ├── pi4j-rpi-400-header-small.png
│ ├── pi4j-rpi-400-header.png
│ ├── pi4j-rpi-400-pinout-small.png
│ ├── pi4j-rpi-400-pinout.png
│ ├── pi4j-rpi-4b-header-small.png
│ ├── pi4j-rpi-4b-header.png
│ ├── pi4j-rpi-4b-pinout-small.png
│ ├── pi4j-rpi-4b-pinout.png
│ ├── pi4j-rpi-cm1-header-small.png
│ ├── pi4j-rpi-cm1-header.png
│ ├── pi4j-rpi-cm1-pinout-j5-small.png
│ ├── pi4j-rpi-cm1-pinout-j5.png
│ ├── pi4j-rpi-cm1-pinout-j6-small.png
│ ├── pi4j-rpi-cm1-pinout-j6.png
│ ├── pi4j-rpi-cm3-header-small.png
│ ├── pi4j-rpi-cm3-header.png
│ ├── pi4j-rpi-cm3-pinout-j5-small.png
│ ├── pi4j-rpi-cm3-pinout-j5.png
│ ├── pi4j-rpi-cm3-pinout-j6-small.png
│ ├── pi4j-rpi-cm3-pinout-j6.png
│ ├── pi4j-rpi-cm3p-header-small.png
│ ├── pi4j-rpi-cm3p-header.png
│ ├── pi4j-rpi-cm3p-pinout-j5-small.png
│ ├── pi4j-rpi-cm3p-pinout-j5.png
│ ├── pi4j-rpi-cm3p-pinout-j6-small.png
│ ├── pi4j-rpi-cm3p-pinout-j6.png
│ ├── pi4j-rpi-cm4-header-small.png
│ ├── pi4j-rpi-cm4-header.png
│ ├── pi4j-rpi-cm4-pinout-small.png
│ ├── pi4j-rpi-cm4-pinout.png
│ ├── pi4j-rpi-zero-header-small.png
│ ├── pi4j-rpi-zero-header.png
│ ├── pi4j-rpi-zero-pinout-small.png
│ ├── pi4j-rpi-zero-pinout.png
│ ├── pi4j-rpi-zerow-header-small.png
│ ├── pi4j-rpi-zerow-header.png
│ ├── pi4j-rpi-zerow-pinout-small.png
│ ├── pi4j-rpi-zerow-pinout.png
│ ├── pinoff.png
│ ├── pinon.png
│ ├── serial-example-large.png
│ ├── serial-example.png
│ ├── serial-screenshot.png
│ ├── system-info-example.png
│ └── under-construction.png
├── manifest.json
├── mstile-144x144.png
├── mstile-150x150.png
├── mstile-310x150.png
├── mstile-310x310.png
├── mstile-70x70.png
└── safari-pinned-tab.svg
├── root
└── index.html
└── site.xml
/.bashrc:
--------------------------------------------------------------------------------
1 | JAVA_HOME=/usr/lib/jvm/java-11-openjdk-arm64
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text eol=lf
2 | *.java text
3 | *.txt text
4 | *.sh eol=lf
5 | build eol=lf
6 | install eol=lf
7 | uninstall eol=lf
8 | pi4j eol=lf
9 | pi4j.list eol=lf
10 | pi4j.gpg eol=lf
11 | control eol=lf
12 | postinst eol=lf
13 | postrm eol=lf
14 | preinst eol=lf
15 | prerm eol=lf
16 |
17 |
18 | #
19 | ## These files are binary and should be left untouched
20 | #
21 |
22 | # (binary is a macro for -text -diff)
23 | *.png binary
24 | *.jpg binary
25 | *.jpeg binary
26 | *.gif binary
27 | *.ico binary
28 | *.mov binary
29 | *.mp4 binary
30 | *.mp3 binary
31 | *.flv binary
32 | *.fla binary
33 | *.swf binary
34 | *.gz binary
35 | *.zip binary
36 | *.7z binary
37 | *.ttf binary
38 | *.eot binary
39 | *.woff binary
40 | *.pyc binary
41 | *.pdf binary
42 |
--------------------------------------------------------------------------------
/.github/workflows/crosscompiling.yml:
--------------------------------------------------------------------------------
1 | name: crosscompiling
2 |
3 | on:
4 | push:
5 | branches: [ master ]
6 | pull_request:
7 | branches: [ master ]
8 |
9 | jobs:
10 | build:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v2
14 | - name: Get latest Docker image
15 | run: docker pull pi4j/pi4j-builder:1.4
16 | - name: Cross-compile in Docker
17 | run: docker run --user "$(id -u):$(id -g)" --rm --volume $(pwd):/build pi4j/pi4j-builder:1.4
18 | - name: Make staging directory
19 | run: mkdir staging
20 | - name: Copy distribution to staging
21 | run: |
22 | cp -r pi4j-distribution/target/*.deb staging
23 | cp -r pi4j-distribution/target/*.zip staging
24 | - name: Upload
25 | uses: actions/upload-artifact@v2
26 | with:
27 | name: pi4j-v1-dist
28 | path: staging
29 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build files
2 | out
3 | target/
4 | gen
5 |
6 | # IntelliJ files
7 | .idea
8 | *.iml
9 |
10 | # Eclipse files
11 | .settings
12 | .classpath
13 | .project
14 | .externalToolBuilders
15 | .metadata
16 | maven-eclipse.xml
17 |
18 | # UltraEdit .bak files
19 | *.bak
20 |
21 | # Vim files
22 | *.swp
23 |
24 | # Mac files
25 | .DS_Store
26 |
27 | # Windows files
28 | Thumbs.db
29 |
30 | # Package Files #
31 | *.war
32 | *.ear
33 | /nbactions.xml
34 |
--------------------------------------------------------------------------------
/NOTICE.txt:
--------------------------------------------------------------------------------
1 | =========================================================================
2 | Pi4J :: Java library for Raspberry Pi
3 | =========================================================================
4 |
5 | Pi4J Library
6 | Copyright (C) 2012-2021 Pi4J.com
7 |
8 | This product includes software developed at:
9 | The Pi4J Project (https://pi4j.com/).
10 |
11 | This product was originally authored by: Robert Savage
12 |
13 | This software is licensed under the Apache License, Version 2.0.
14 | More information about licensing terms can be found at:
15 | https://pi4j.com/license.html
16 |
17 | Additional information about this project and its authors can be found at:
18 | - https://pi4j.com/
19 | - http://www.raspicentral.com
20 | - http://www.savagehomeautomation.com
21 |
22 | This software compiles against libraries from the WiringPi project.
23 | The Wiring Pi project is provided by Gordon Henderson and is available
24 | from
25 | http://wiringpi.com/
26 |
27 | The WiringPi project is licensed under the GNU LGPLv3 license
28 | http://www.gnu.org/licenses/lgpl.html
29 |
30 | =========================================================================
31 | Subject to the terms of the software license, this NOTICE file must be
32 | included in any Derivative Works that You distribute as a readable copy.
33 | (Section 4d)
34 |
--------------------------------------------------------------------------------
/build-docker.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 | ###
3 | # #%L
4 | # **********************************************************************
5 | # ORGANIZATION : Pi4J
6 | # PROJECT : Pi4J :: JNI Native Library
7 | # FILENAME : build-docker.sh
8 | #
9 | # This file is part of the Pi4J project. More information about
10 | # this project can be found here: https://pi4j.com/
11 | # **********************************************************************
12 | # %%
13 | # Copyright (C) 2012 - 2019 Pi4J
14 | # %%
15 | #
16 | # Licensed under the Apache License, Version 2.0 (the "License");
17 | # you may not use this file except in compliance with the License.
18 | # You may obtain a copy of the License at
19 | #
20 | # http://www.apache.org/licenses/LICENSE-2.0
21 | #
22 | # Unless required by applicable law or agreed to in writing, software
23 | # distributed under the License is distributed on an "AS IS" BASIS,
24 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | # See the License for the specific language governing permissions and
26 | # limitations under the License.
27 | #
28 | # #L%
29 | ###
30 |
31 | echo
32 | echo "**********************************************************************"
33 | echo "**********************************************************************"
34 | echo "* *"
35 | echo "* COMPILE ENTIRE Pi4J PROJECT USING A PRECONFIGURED DOCKER IMAGE *"
36 | echo "* *"
37 | echo "**********************************************************************"
38 | echo "**********************************************************************"
39 | echo
40 |
41 | # -------------------------------------------------------------
42 | # THIS BUILD WILL COMPILE NATIVE LIBRARIES USING THE PI4J
43 | # DOCKER CROSS-COMPILER BUILDER IMAGE FOR THE FOLLOWING:
44 | # -- ARMv6,ARMv7, ARMv8 32-BIT (ARMHF)
45 | # -- ARMv8 64-BIT (ARM64)
46 | # -------------------------------------------------------------
47 | docker pull pi4j/pi4j-builder:1.4
48 | docker run --user "$(id -u):$(id -g)" --rm --volume $(pwd):/build pi4j/pi4j-builder:1.4
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/concurrent/ExecutorServiceFactory.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.concurrent;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : ExecutorServiceFactory.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import java.util.concurrent.ExecutorService;
32 | import java.util.concurrent.ScheduledExecutorService;
33 |
34 | @SuppressWarnings("unused")
35 | public interface ExecutorServiceFactory
36 | {
37 | public ScheduledExecutorService getScheduledExecutorService();
38 | public ExecutorService getGpioEventExecutorService();
39 | public ExecutorService getEventExecutorService();
40 |
41 | @Deprecated
42 | public ExecutorService newSingleThreadExecutorService();
43 | public void shutdown();
44 | }
45 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/file/FileException.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.file;
2 |
3 | /*-
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : FileException.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | /**
31 | * Created by crgodsey on 8/23/16.
32 | */
33 | public class FileException {
34 | }
35 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioPinAnalog.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinAnalog.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | /**
32 | * Gpio analog pin interface. This interface is extension of {@link GpioPin} interface
33 | * with operation to read an analog value.
34 | *
35 | * @author Robert Savage (http://www.savagehomeautomation.com)
37 | */
38 | public interface GpioPinAnalog extends GpioPin {
39 |
40 | double getValue();
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioPinAnalogOutput.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinAnalogOutput.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | /**
31 | * Gpio analog output pin interface.
32 | *
33 | * @author Robert Savage (http://www.savagehomeautomation.com)
35 | */
36 | @SuppressWarnings("unused")
37 | public interface GpioPinAnalogOutput extends GpioPinAnalog, GpioPinOutput {
38 |
39 | void setValue(double value);
40 | void setValue(Number value);
41 | }
42 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioPinDigital.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinDigital.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | /**
31 | * Gpio digital pin interface. This interface is extension of {@link GpioPin} interface
32 | * with operation to read digital states.
33 | *
34 | * @author Robert Savage (http://www.savagehomeautomation.com)
36 | */
37 | @SuppressWarnings("unused")
38 | public interface GpioPinDigital extends GpioPin {
39 |
40 | boolean isHigh();
41 | boolean isLow();
42 | PinState getState();
43 | boolean isState(PinState state);
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioPinDigitalMultipurpose.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinDigitalMultipurpose.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | /**
32 | * Gpio digital pin interface. This interface is extension of {@link GpioPin} interface
33 | * with operation to read digital states.
34 | *
35 | * @author Robert Savage (http://www.savagehomeautomation.com)
37 | */
38 | @SuppressWarnings("unused")
39 | public interface GpioPinDigitalMultipurpose extends GpioPinDigitalInput, GpioPinDigitalOutput {
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioPinInput.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio;
2 |
3 | import com.pi4j.io.gpio.trigger.GpioTrigger;
4 |
5 | import java.util.Collection;
6 | import java.util.List;
7 |
8 | /*
9 | * #%L
10 | * **********************************************************************
11 | * ORGANIZATION : Pi4J
12 | * PROJECT : Pi4J :: Java Library (Core)
13 | * FILENAME : GpioPinInput.java
14 | *
15 | * This file is part of the Pi4J project. More information about
16 | * this project can be found here: https://pi4j.com/
17 | * **********************************************************************
18 | * %%
19 | * Copyright (C) 2012 - 2021 Pi4J
20 | * %%
21 | * Licensed under the Apache License, Version 2.0 (the "License");
22 | * you may not use this file except in compliance with the License.
23 | * You may obtain a copy of the License at
24 | *
25 | * http://www.apache.org/licenses/LICENSE-2.0
26 | *
27 | * Unless required by applicable law or agreed to in writing, software
28 | * distributed under the License is distributed on an "AS IS" BASIS,
29 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30 | * See the License for the specific language governing permissions and
31 | * limitations under the License.
32 | * #L%
33 | */
34 |
35 | /**
36 | * Gpio input pin interface. This interface is extension of {@link com.pi4j.io.gpio.GpioPin} interface
37 | * with listeners and triggers support..
38 | *
39 | * @author Robert Savage (http://www.savagehomeautomation.com)
41 | */
42 | @SuppressWarnings("unused")
43 | public interface GpioPinInput extends GpioPin {
44 |
45 | Collection getTriggers();
46 | void addTrigger(GpioTrigger... trigger);
47 | void addTrigger(List extends GpioTrigger> triggers);
48 |
49 | void removeTrigger(GpioTrigger... trigger);
50 | void removeTrigger(List extends GpioTrigger> triggers);
51 | void removeAllTriggers();
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioPinOutput.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinOutput.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | /**
31 | * Gpio pin output decorator interface.
32 | *
33 | * @author Robert Savage (http://www.savagehomeautomation.com)
35 | */
36 | @SuppressWarnings("unused")
37 | public interface GpioPinOutput extends GpioPin {
38 | }
39 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioPinPwm.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinPwm.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | /**
31 | * Gpio input pin interface. This interface is extension of {@link GpioPin} interface
32 | * with reading pwm values.
33 | *
34 | * @author Robert Savage (http://www.savagehomeautomation.com)
36 | */
37 | @SuppressWarnings("unused")
38 | public interface GpioPinPwm extends GpioPin {
39 |
40 | /**
41 | * If this is a hardware PWM pin, the value will be between a range of 0 to 1024.
42 | * If this is a software emulated PWM pin, the value will be between a range of 0 to 100.
43 | *
44 | * @return the value currently set for the PWM output
45 | */
46 | int getPwm();
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioPinPwmOutput.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinPwmOutput.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | /**
31 | * Gpio output pwm pin interface.This interface adds operation to set output pwm value.
32 | *
33 | * @author Robert Savage (http://www.savagehomeautomation.com)
35 | */
36 | @SuppressWarnings("unused")
37 | public interface GpioPinPwmOutput extends GpioPinPwm, GpioPinOutput {
38 |
39 | /**
40 | * Set the PWM value/rate to toggle the GPIO pin.
41 | * If this is a hardware PWM pin, the value should be between a range of 0 to 1024.
42 | * If this is a software emulated PWM pin, the value should be between a range of 0 to 100.
43 | *
44 | * @param value
45 | */
46 | void setPwm(int value);
47 |
48 | /**
49 | * This sets the range register in the PWM generator.
50 | * The default is 1024 for hardware PWM.
51 | * The default is 100 for software emulated PWM.
52 | *
53 | * @param range
54 | */
55 | void setPwmRange(int range);
56 | }
57 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioPinShutdown.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinShutdown.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | /**
31 | * Gpio shutdown pin interface.
32 | *
33 | * @author Robert Savage (http://www.savagehomeautomation.com)
35 | */
36 | @SuppressWarnings("unused")
37 | public interface GpioPinShutdown {
38 |
39 | void setUnexport(Boolean unexport);
40 | Boolean getUnexport();
41 | void setMode(PinMode mode);
42 | PinMode getMode();
43 | void setPullResistor(PinPullResistance resistance);
44 | PinPullResistance getPullResistor();
45 | void setState(PinState state);
46 | PinState getState();
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/Pin.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio;
2 |
3 | import java.util.EnumSet;
4 |
5 | /*
6 | * #%L
7 | * **********************************************************************
8 | * ORGANIZATION : Pi4J
9 | * PROJECT : Pi4J :: Java Library (Core)
10 | * FILENAME : Pin.java
11 | *
12 | * This file is part of the Pi4J project. More information about
13 | * this project can be found here: https://pi4j.com/
14 | * **********************************************************************
15 | * %%
16 | * Copyright (C) 2012 - 2021 Pi4J
17 | * %%
18 | * Licensed under the Apache License, Version 2.0 (the "License");
19 | * you may not use this file except in compliance with the License.
20 | * You may obtain a copy of the License at
21 | *
22 | * http://www.apache.org/licenses/LICENSE-2.0
23 | *
24 | * Unless required by applicable law or agreed to in writing, software
25 | * distributed under the License is distributed on an "AS IS" BASIS,
26 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27 | * See the License for the specific language governing permissions and
28 | * limitations under the License.
29 | * #L%
30 | */
31 |
32 | /**
33 | * This interface describes a pin.
34 | *
35 | * @author Robert Savage (http://www.savagehomeautomation.com)
37 | */
38 | @SuppressWarnings("unused")
39 | public interface Pin extends Comparable {
40 |
41 | String getProvider();
42 | int getAddress();
43 | String getName();
44 | EnumSet getSupportedPinModes();
45 | boolean supportsPinPullResistance();
46 | EnumSet getSupportedPinPullResistance();
47 | boolean supportsPinEdges();
48 | boolean supportsPinEvents();
49 | EnumSet getSupportedPinEdges();
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/PinPullResistance.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio;
2 |
3 | import java.util.EnumSet;
4 |
5 | /*
6 | * #%L
7 | * **********************************************************************
8 | * ORGANIZATION : Pi4J
9 | * PROJECT : Pi4J :: Java Library (Core)
10 | * FILENAME : PinPullResistance.java
11 | *
12 | * This file is part of the Pi4J project. More information about
13 | * this project can be found here: https://pi4j.com/
14 | * **********************************************************************
15 | * %%
16 | * Copyright (C) 2012 - 2021 Pi4J
17 | * %%
18 | * Licensed under the Apache License, Version 2.0 (the "License");
19 | * you may not use this file except in compliance with the License.
20 | * You may obtain a copy of the License at
21 | *
22 | * http://www.apache.org/licenses/LICENSE-2.0
23 | *
24 | * Unless required by applicable law or agreed to in writing, software
25 | * distributed under the License is distributed on an "AS IS" BASIS,
26 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27 | * See the License for the specific language governing permissions and
28 | * limitations under the License.
29 | * #L%
30 | */
31 |
32 | /**
33 | * Pin pull up/down resistance definition.
34 | *
35 | * @author Robert Savage (http://www.savagehomeautomation.com)
37 | */
38 | public enum PinPullResistance {
39 |
40 | OFF(0, "off"),
41 | PULL_DOWN(1, "down"),
42 | PULL_UP(2, "up");
43 |
44 | private final int value;
45 | private final String name;
46 |
47 | private PinPullResistance(int value, String name) {
48 | this.value = value;
49 | this.name = name;
50 | }
51 |
52 | public int getValue() {
53 | return value;
54 | }
55 |
56 | public String getName() {
57 | return name;
58 | }
59 |
60 | @Override
61 | public String toString() {
62 | return name.toUpperCase();
63 | }
64 |
65 | public static EnumSet all() {
66 | return EnumSet.allOf(PinPullResistance.class);
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/RaspiPinNumberingScheme.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : RaspiPinNumberingScheme.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 |
32 |
33 | /**
34 | * Raspberry Pi pin numbering scheme.
35 | *
36 | * @author Robert Savage (http://www.savagehomeautomation.com)
38 | */
39 | public enum RaspiPinNumberingScheme {
40 | DEFAULT_PIN_NUMBERING, // this numbering scheme uses the abstract WiringPi pin number scheme
41 | BROADCOM_PIN_NUMBERING // this numbering scheme uses the concrete Broadcom pin number scheme
42 | }
43 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/event/GpioPinAnalogValueChangeEvent.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.event;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinAnalogValueChangeEvent.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import com.pi4j.io.gpio.GpioPin;
32 |
33 | /**
34 | * GPIO analog pin value change event.
35 | *
36 | * @author Robert Savage (http://www.savagehomeautomation.com)
38 | */
39 | public class GpioPinAnalogValueChangeEvent extends GpioPinEvent {
40 |
41 | private static final long serialVersionUID = -1036445757629271L;
42 | private final double value;
43 |
44 | /**
45 | * Default event constructor
46 | *
47 | * @param obj Ignore this parameter
48 | * @param pin GPIO pin number (not header pin number; not wiringPi pin number)
49 | * @param value New GPIO pin value.
50 | */
51 | public GpioPinAnalogValueChangeEvent(Object obj, GpioPin pin, double value) {
52 | super(obj, pin, PinEventType.ANALOG_VALUE_CHANGE);
53 | this.value = value;
54 | }
55 |
56 | /**
57 | * Get the new pin value raised in this event.
58 | *
59 | * @return GPIO pin value
60 | */
61 | public double getValue() {
62 | return value;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/event/GpioPinEvent.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.event;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinEvent.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import com.pi4j.io.gpio.GpioPin;
32 |
33 | import java.util.EventObject;
34 |
35 | /**
36 | * GPIO pin event.
37 | *
38 | * @author Robert Savage (http://www.savagehomeautomation.com)
40 | */
41 | @SuppressWarnings("unused")
42 | public class GpioPinEvent extends EventObject {
43 |
44 | private static final long serialVersionUID = -1036445757629271L;
45 | protected final GpioPin pin;
46 | protected final PinEventType type;
47 |
48 | public GpioPinEvent(Object obj, GpioPin pin, PinEventType type) {
49 | super(obj);
50 | this.pin = pin;
51 | this.type = type;
52 | }
53 |
54 | /**
55 | * Get the pin number that changed and raised this event.
56 | *
57 | * @return GPIO pin number (not header pin number; not wiringPi pin number)
58 | */
59 | public GpioPin getPin() {
60 | return pin;
61 | }
62 |
63 | public PinEventType getEventType() {
64 | return type;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/event/GpioPinListener.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.event;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinListener.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 |
32 | /**
33 | *
This interface implements the callback event handler for GPIO pin state changes.
34 | *
35 | *
36 | * Before using the Pi4J library, you need to ensure that the Java VM in configured with access to
37 | * the following system libraries:
38 | *
39 | *
pi4j
40 | *
wiringPi
41 | *
42 | *
This library depends on the wiringPi native system library. (developed by
43 | * Gordon Henderson @ http://wiringpi.com/)
44 | *
45 | *
46 | *
47 | * @see https://pi4j.com/
48 | * @author Robert Savage (http://www.savagehomeautomation.com)
50 | */
51 | public interface GpioPinListener extends java.util.EventListener {
52 | }
53 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/event/GpioPinListenerAnalog.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.event;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinListenerAnalog.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 |
32 | /**
33 | *
This interface implements the callback event handler for GPIO pin state changes.
34 | *
35 | *
36 | * Before using the Pi4J library, you need to ensure that the Java VM in configured with access to
37 | * the following system libraries:
38 | *
39 | *
pi4j
40 | *
wiringPi
41 | *
42 | *
This library depends on the wiringPi native system library. (developed by
43 | * Gordon Henderson @ http://wiringpi.com/)
44 | *
45 | *
46 | *
47 | * @see https://pi4j.com/
48 | * @author Robert Savage (http://www.savagehomeautomation.com)
50 | */
51 | public interface GpioPinListenerAnalog extends GpioPinListener {
52 |
53 | void handleGpioPinAnalogValueChangeEvent(GpioPinAnalogValueChangeEvent event);
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/event/GpioPinListenerDigital.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.event;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinListenerDigital.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 |
32 | /**
33 | *
This interface implements the callback event handler for GPIO pin state changes.
34 | *
35 | *
36 | * Before using the Pi4J library, you need to ensure that the Java VM in configured with access to
37 | * the following system libraries:
38 | *
39 | *
pi4j
40 | *
wiringPi
41 | *
42 | *
This library depends on the wiringPi native system library. (developed by
43 | * Gordon Henderson @ http://wiringpi.com/)
44 | *
45 | *
46 | *
47 | * @see https://pi4j.com/
48 | * @author Robert Savage (http://www.savagehomeautomation.com)
50 | */
51 | public interface GpioPinListenerDigital extends GpioPinListener {
52 |
53 | void handleGpioPinDigitalStateChangeEvent(GpioPinDigitalStateChangeEvent event);
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/event/PinAnalogValueChangeEvent.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.event;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : PinAnalogValueChangeEvent.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import com.pi4j.io.gpio.Pin;
32 |
33 | /**
34 | * GPIO analog pin value change event.
35 | *
36 | * @author Robert Savage (http://www.savagehomeautomation.com)
38 | */
39 | public class PinAnalogValueChangeEvent extends PinEvent {
40 |
41 | private static final long serialVersionUID = -6210539419288104794L;
42 | private final double value;
43 |
44 | /**
45 | * Default event constructor
46 | *
47 | * @param obj Ignore this parameter
48 | * @param pin GPIO pin number (not header pin number; not wiringPi pin number)
49 | * @param value New GPIO pin analog value.
50 | */
51 | public PinAnalogValueChangeEvent(Object obj, Pin pin, double value) {
52 | super(obj, pin, PinEventType.ANALOG_VALUE_CHANGE);
53 | this.value = value;
54 | }
55 |
56 | /**
57 | * Get the new pin value raised in this event.
58 | *
59 | * @return GPIO pin value
60 | */
61 | public double getValue() {
62 | return value;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/event/PinEventType.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.event;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : PinEventType.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | /**
32 | * Pin event type.
33 | *
34 | * @author Robert Savage (http://www.savagehomeautomation.com)
36 | */
37 | public enum PinEventType {
38 |
39 | DIGITAL_STATE_CHANGE,
40 | ANALOG_VALUE_CHANGE
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/event/PinListener.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.event;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : PinListener.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | /**
31 | *
Pin Listener Interface
32 | *
33 | *
This interface implements the callback event handler for Pin state changes.
34 | *
35 | *
36 | * Before using the Pi4J library, you need to ensure that the Java VM in configured with access to
37 | * the following system libraries:
38 | *
39 | *
pi4j
40 | *
wiringPi
41 | *
42 | *
This library depends on the wiringPi native system library. (developed by
43 | * Gordon Henderson @ http://wiringpi.com/)
44 | *
45 | *
46 | *
47 | * @see https://pi4j.com/
48 | * @author Robert Savage (http://www.savagehomeautomation.com)
50 | */
51 | public interface PinListener extends java.util.EventListener {
52 |
53 | void handlePinEvent(PinEvent event);
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/exception/GpioPinExistsException.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.exception;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinExistsException.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | import com.pi4j.io.gpio.Pin;
31 |
32 |
33 | /**
34 | * GPIO pin already exists exception.
35 | *
36 | * @author Robert Savage (http://www.savagehomeautomation.com)
38 | */
39 | @SuppressWarnings("unused")
40 | public class GpioPinExistsException extends RuntimeException {
41 |
42 | private static final long serialVersionUID = 1171484082578232353L;
43 |
44 | private final Pin pin;
45 |
46 | public GpioPinExistsException(Pin pin) {
47 | super("This GPIO pin already exists: " + pin.toString());
48 | this.pin = pin;
49 | }
50 |
51 | public Pin getPin() {
52 | return pin;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/exception/GpioPinNotProvisionedException.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.exception;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioPinNotProvisionedException.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import com.pi4j.io.gpio.Pin;
32 |
33 |
34 | /**
35 | * GPIO pin not provisioned exception.
36 | *
37 | * @author Robert Savage (http://www.savagehomeautomation.com)
39 | */
40 | @SuppressWarnings("unused")
41 | public class GpioPinNotProvisionedException extends RuntimeException {
42 |
43 | private static final long serialVersionUID = 1171484082578232353L;
44 |
45 | private final Pin pin;
46 |
47 | public GpioPinNotProvisionedException(Pin pin) {
48 | super("This GPIO pin has not been provisioned: " + pin.toString());
49 | this.pin = pin;
50 | }
51 |
52 | public Pin getPin() {
53 | return pin;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/exception/InvalidPinException.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.exception;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : InvalidPinException.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import com.pi4j.io.gpio.Pin;
32 |
33 |
34 | /**
35 | * Invalid pin exception.
36 | *
37 | * @author Robert Savage (http://www.savagehomeautomation.com)
39 | */
40 | @SuppressWarnings("unused")
41 | public class InvalidPinException extends RuntimeException {
42 |
43 | private static final long serialVersionUID = -5101222911651959182L;
44 | private final Pin pin;
45 |
46 | public InvalidPinException(Pin pin) {
47 | super("Invalid pin exception; this pin [" + pin.getName() + "] is not supported by GPIO provider [" + pin.getProvider() + "]");
48 | this.pin = pin;
49 | }
50 |
51 | public Pin getPin() {
52 | return pin;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/exception/InvalidPinModeException.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.exception;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : InvalidPinModeException.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | import com.pi4j.io.gpio.Pin;
31 |
32 | /**
33 | * Invalid pin mode exception.
34 | *
35 | * @author Robert Savage (http://www.savagehomeautomation.com)
37 | */
38 | @SuppressWarnings("unused")
39 | public class InvalidPinModeException extends RuntimeException {
40 |
41 | private static final long serialVersionUID = -5101222911651959182L;
42 | private final Pin pin;
43 |
44 | public InvalidPinModeException(Pin pin, String message) {
45 | super(message);
46 | this.pin = pin;
47 | }
48 |
49 | public Pin getPin() {
50 | return pin;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/exception/PinProviderException.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.exception;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : PinProviderException.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import com.pi4j.io.gpio.GpioProvider;
32 | import com.pi4j.io.gpio.Pin;
33 |
34 | /**
35 | * Pin provider exception.
36 | *
37 | * @author Robert Savage (http://www.savagehomeautomation.com)
39 | */
40 | @SuppressWarnings("unused")
41 | public class PinProviderException extends RuntimeException {
42 |
43 | private static final long serialVersionUID = -519207741462960871L;
44 | private final Pin pin;
45 | private final GpioProvider gpioProvider;
46 |
47 | public PinProviderException(GpioProvider provider, Pin pin) {
48 | super("GPIO pin [" + pin.toString() + "] expects provider [" + pin.getProvider() + "] but is attempting to be provisioned with provider [" + provider.getName() + "]; provisioning failed.");
49 | this.pin = pin;
50 | this.gpioProvider = provider;
51 | }
52 |
53 | public Pin getPin() {
54 | return pin;
55 | }
56 | public GpioProvider getGpioProvider() {
57 | return gpioProvider;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/exception/UnsupportedBoardType.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.exception;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : UnsupportedBoardType.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import com.pi4j.io.gpio.Pin;
32 | import com.pi4j.io.gpio.PinPullResistance;
33 |
34 | /**
35 | * Unsupported hardware boart model/type.
36 | *
37 | * @author Robert Savage (http://www.savagehomeautomation.com)
39 | */
40 | @SuppressWarnings("unused")
41 | public class UnsupportedBoardType extends RuntimeException {
42 |
43 | private static final long serialVersionUID = 1L;
44 |
45 | public UnsupportedBoardType() {
46 | super("Unsupported/unknown board type; unable to detect hardware.");
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/exception/UnsupportedPinEventsException.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.exception;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : UnsupportedPinEventsException.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import com.pi4j.io.gpio.Pin;
32 |
33 | /**
34 | * Unsupported pin events exception.
35 | *
36 | * @author Robert Savage (http://www.savagehomeautomation.com)
38 | */
39 | @SuppressWarnings("unused")
40 | public class UnsupportedPinEventsException extends RuntimeException {
41 |
42 | private static final long serialVersionUID = 6435112275151751895L;
43 | private final Pin pin;
44 |
45 | public UnsupportedPinEventsException(Pin pin) {
46 | super("This GPIO pin [" + pin.getName() + "] does not support pin events; no support for edge detection or interrupts; you will have to poll this pin for change changes.");
47 | this.pin = pin;
48 | }
49 |
50 | public Pin getPin() {
51 | return pin;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/exception/UnsupportedPinModeException.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.exception;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : UnsupportedPinModeException.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import com.pi4j.io.gpio.Pin;
32 | import com.pi4j.io.gpio.PinMode;
33 |
34 | /**
35 | * Unsupported pin exception.
36 | *
37 | * @author Robert Savage (http://www.savagehomeautomation.com)
39 | */
40 | @SuppressWarnings("unused")
41 | public class UnsupportedPinModeException extends RuntimeException {
42 |
43 | private static final long serialVersionUID = 6435118278151751895L;
44 | private final Pin pin;
45 | private final PinMode mode;
46 |
47 | public UnsupportedPinModeException(Pin pin, PinMode mode) {
48 | super("This GPIO pin [" + pin.getName() + "] does not support the pin mode specified [" + mode.getName() + "]");
49 | this.pin = pin;
50 | this.mode = mode;
51 | }
52 |
53 | public Pin getPin() {
54 | return pin;
55 | }
56 |
57 | public PinMode getMode() {
58 | return mode;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/exception/ValidationException.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.exception;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : ValidationException.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 | /**
30 | * @author Christian Wehrli
31 | */
32 | @SuppressWarnings("unused")
33 | public class ValidationException extends RuntimeException {
34 |
35 | private static final long serialVersionUID = 4526136277211409422L;
36 |
37 | public ValidationException(String message) {
38 | super(message);
39 | }
40 |
41 | public ValidationException(String message, Throwable cause) {
42 | super(message, cause);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/tasks/impl/GpioBlinkStopTaskImpl.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.tasks.impl;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioBlinkStopTaskImpl.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import java.util.concurrent.ScheduledFuture;
32 |
33 | import com.pi4j.io.gpio.GpioPinDigitalOutput;
34 | import com.pi4j.io.gpio.PinState;
35 |
36 | public class GpioBlinkStopTaskImpl implements Runnable {
37 |
38 | private final GpioPinDigitalOutput pin;
39 | private final PinState stopState;
40 | private final ScheduledFuture> blinkTask;
41 |
42 | public GpioBlinkStopTaskImpl(GpioPinDigitalOutput pin, PinState stopState, ScheduledFuture> blinkTask) {
43 | this.pin = pin;
44 | this.stopState = stopState;
45 | this.blinkTask = blinkTask;
46 | }
47 |
48 | public void run() {
49 | // cancel the blinking task
50 | blinkTask.cancel(true);
51 |
52 | // set the pin to the stop blinking state
53 | pin.setState(stopState);
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/tasks/impl/GpioBlinkTaskImpl.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.tasks.impl;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioBlinkTaskImpl.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import com.pi4j.io.gpio.GpioPinDigitalOutput;
32 |
33 | public class GpioBlinkTaskImpl implements Runnable {
34 |
35 | private final GpioPinDigitalOutput pin;
36 |
37 | public GpioBlinkTaskImpl(GpioPinDigitalOutput pin) {
38 | this.pin = pin;
39 | }
40 |
41 | public void run() {
42 | pin.toggle();
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/trigger/GpioInverseSyncStateTrigger.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.trigger;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioInverseSyncStateTrigger.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | import com.pi4j.io.gpio.GpioPin;
31 | import com.pi4j.io.gpio.GpioPinDigitalOutput;
32 | import com.pi4j.io.gpio.PinState;
33 |
34 | import java.util.List;
35 |
36 | @SuppressWarnings("unused")
37 | public class GpioInverseSyncStateTrigger extends OutputTargetedGpioTrigger {
38 |
39 | public GpioInverseSyncStateTrigger(GpioPinDigitalOutput targetPin) {
40 | super(targetPin);
41 | }
42 |
43 | public GpioInverseSyncStateTrigger(PinState state, GpioPinDigitalOutput targetPin) {
44 | super(state, targetPin);
45 | }
46 |
47 | public GpioInverseSyncStateTrigger(PinState[] states, GpioPinDigitalOutput targetPin) {
48 | super(states, targetPin);
49 | }
50 |
51 | public GpioInverseSyncStateTrigger(List states, GpioPinDigitalOutput targetPin) {
52 | super(states, targetPin);
53 | }
54 |
55 | @Override
56 | public void invoke(GpioPin pin, PinState state) {
57 | if (targetPin != null) {
58 | if (state == PinState.HIGH) {
59 | targetPin.setState(PinState.LOW);
60 | } else {
61 | targetPin.setState(PinState.HIGH);
62 | }
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/trigger/GpioSyncStateTrigger.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.trigger;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioSyncStateTrigger.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | import com.pi4j.io.gpio.GpioPin;
31 | import com.pi4j.io.gpio.GpioPinDigitalOutput;
32 | import com.pi4j.io.gpio.PinState;
33 |
34 | import java.util.List;
35 |
36 | @SuppressWarnings("unused")
37 | public class GpioSyncStateTrigger extends OutputTargetedGpioTrigger {
38 |
39 | public GpioSyncStateTrigger(GpioPinDigitalOutput targetPin) {
40 | super(targetPin);
41 | }
42 |
43 | public GpioSyncStateTrigger(PinState state, GpioPinDigitalOutput targetPin) {
44 | super(state, targetPin);
45 | }
46 |
47 | public GpioSyncStateTrigger(PinState[] states, GpioPinDigitalOutput targetPin) {
48 | super(states, targetPin);
49 | }
50 |
51 | public GpioSyncStateTrigger(List states, GpioPinDigitalOutput targetPin) {
52 | super(states, targetPin);
53 | }
54 |
55 | @Override
56 | public void invoke(GpioPin pin, PinState state) {
57 | if (targetPin != null) {
58 | targetPin.setState(state);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/trigger/GpioTrigger.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.trigger;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioTrigger.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | import java.util.List;
31 |
32 | import com.pi4j.io.gpio.GpioPin;
33 | import com.pi4j.io.gpio.PinState;
34 |
35 | @SuppressWarnings("unused")
36 | public interface GpioTrigger {
37 |
38 | void addPinState(PinState... state);
39 |
40 | void addPinState(List extends PinState> states);
41 |
42 | boolean hasPinState(PinState state);
43 |
44 | void invoke(GpioPin pin, PinState state);
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/gpio/trigger/OutputTargetedGpioTrigger.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.trigger;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : OutputTargetedGpioTrigger.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | import com.pi4j.io.gpio.GpioPinDigitalOutput;
31 | import com.pi4j.io.gpio.PinState;
32 |
33 | import java.util.List;
34 |
35 | @SuppressWarnings("unused")
36 | public abstract class OutputTargetedGpioTrigger extends GpioTriggerBase {
37 |
38 | protected final GpioPinDigitalOutput targetPin;
39 |
40 | public OutputTargetedGpioTrigger(GpioPinDigitalOutput targetPin) {
41 | super();
42 | this.targetPin = targetPin;
43 | }
44 |
45 | public OutputTargetedGpioTrigger(PinState state, GpioPinDigitalOutput targetPin) {
46 | super(state);
47 | this.targetPin = targetPin;
48 | }
49 |
50 | public OutputTargetedGpioTrigger(PinState[] states, GpioPinDigitalOutput targetPin) {
51 | super(states);
52 | this.targetPin = targetPin;
53 | }
54 |
55 | public OutputTargetedGpioTrigger(List states, GpioPinDigitalOutput targetPin) {
56 | super(states);
57 | this.targetPin = targetPin;
58 | }
59 |
60 | public GpioPinDigitalOutput getTargetPin() {
61 | return targetPin;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CFactoryProvider.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.i2c;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : I2CFactoryProvider.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | import java.io.IOException;
31 | import java.util.concurrent.TimeUnit;
32 |
33 | import com.pi4j.io.i2c.I2CFactory.UnsupportedBusNumberException;
34 |
35 | public interface I2CFactoryProvider {
36 |
37 | I2CBus getBus(int busNumber, long lockAquireTimeout, TimeUnit lockAquireTimeoutUnit)
38 | throws UnsupportedBusNumberException, IOException;
39 | }
40 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/serial/DataBits.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.serial;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : DataBits.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | public enum DataBits {
31 |
32 | _5(com.pi4j.jni.Serial.DATA_BITS_5),
33 | _6(com.pi4j.jni.Serial.DATA_BITS_6),
34 | _7(com.pi4j.jni.Serial.DATA_BITS_7),
35 | _8(com.pi4j.jni.Serial.DATA_BITS_8);
36 |
37 | private int dataBits = 0;
38 |
39 | private DataBits(int dataBits){
40 | this.dataBits = dataBits;
41 | }
42 |
43 | public int getValue(){
44 | return this.dataBits;
45 | }
46 |
47 | public static DataBits getInstance(int data_bits){
48 | for(DataBits db : DataBits.values()){
49 | if(db.getValue() == data_bits){
50 | return db;
51 | }
52 | }
53 | return null;
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/serial/FlowControl.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.serial;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : FlowControl.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | public enum FlowControl {
31 |
32 | NONE(com.pi4j.jni.Serial.FLOW_CONTROL_NONE),
33 | HARDWARE(com.pi4j.jni.Serial.FLOW_CONTROL_HARDWARE),
34 | SOFTWARE(com.pi4j.jni.Serial.FLOW_CONTROL_SOFTWARE);
35 |
36 | private int index = 0;
37 |
38 | private FlowControl(int index){
39 | this.index = index;
40 | }
41 |
42 | public int getIndex(){
43 | return this.index;
44 | }
45 |
46 | public static FlowControl getInstance(String flow_control) {
47 | return FlowControl.valueOf(flow_control.toUpperCase());
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/serial/Parity.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.serial;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : Parity.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | public enum Parity {
31 |
32 | NONE(com.pi4j.jni.Serial.PARITY_NONE),
33 | ODD(com.pi4j.jni.Serial.PARITY_ODD),
34 | EVEN(com.pi4j.jni.Serial.PARITY_EVEN),
35 |
36 | // NOT ALL UNIX SYSTEM SUPPORT 'MARK' PARITY; THIS IS EXPERIMENTAL
37 | MARK(com.pi4j.jni.Serial.PARITY_MARK),
38 |
39 | //NOT ALL UNIX SYSTEM SUPPORT 'SPACE' PARITY; THIS IS EXPERIMENTAL
40 | SPACE(com.pi4j.jni.Serial.PARITY_SPACE);
41 |
42 | private int index = 0;
43 |
44 | private Parity(int index){
45 | this.index = index;
46 | }
47 |
48 | public int getIndex(){
49 | return this.index;
50 | }
51 |
52 | public static Parity getInstance(String parity) {
53 | return Parity.valueOf(parity.toUpperCase());
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/serial/RaspberryPiSerial.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.serial;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : RaspberryPiSerial.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | /**
31 | * This class simply exposed the available UART/serial port
32 | * address (device file paths) that are exposed on the RaspberryPi.
33 | */
34 | public class RaspberryPiSerial {
35 |
36 | public static final String AMA0_COM_PORT = "/dev/ttyAMA0";
37 | public static final String DEFAULT_COM_PORT = AMA0_COM_PORT;
38 |
39 | // The "S0" com port was added with the introduction of the Raspberry Pi 3B model.
40 | public static final String S0_COM_PORT = "/dev/ttyS0";
41 | }
42 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/serial/StopBits.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.serial;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : StopBits.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | public enum StopBits {
31 |
32 | _1(com.pi4j.jni.Serial.STOP_BITS_1),
33 | _2(com.pi4j.jni.Serial.STOP_BITS_2);
34 |
35 | private int stopBits = 0;
36 |
37 | private StopBits(int stopBits){
38 | this.stopBits = stopBits;
39 | }
40 |
41 | public int getValue(){
42 | return this.stopBits;
43 | }
44 |
45 | public static StopBits getInstance(int stop_bits){
46 | for(StopBits sb : StopBits.values()){
47 | if(sb.getValue() == stop_bits){
48 | return sb;
49 | }
50 | }
51 | return null;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/serial/tasks/SerialDataEventDispatchTaskImpl.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.serial.tasks;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : SerialDataEventDispatchTaskImpl.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import com.pi4j.io.serial.SerialDataEvent;
32 | import com.pi4j.io.serial.SerialDataEventListener;
33 |
34 | import java.util.ArrayList;
35 | import java.util.Collection;
36 |
37 | public class SerialDataEventDispatchTaskImpl implements Runnable {
38 |
39 | private final SerialDataEvent event;
40 | private final Collection listeners;
41 |
42 | public SerialDataEventDispatchTaskImpl(SerialDataEvent event, Collection listeners) {
43 | this.event = event;
44 | this.listeners = listeners;
45 | }
46 |
47 | @Override
48 | public void run() {
49 |
50 | // create a copy of the listeners collection
51 | Collection listenersCopy = new ArrayList<>(listeners);
52 |
53 | // process event callbacks for serial data listeners
54 | for (SerialDataEventListener listener : listenersCopy) {
55 | if (listener != null) {
56 | listener.dataReceived(event);
57 | }
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/spi/SpiChannel.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.spi;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : SpiChannel.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | public enum SpiChannel {
31 | CS0(0), CS1(1);
32 |
33 | private final short channel;
34 |
35 | private SpiChannel(int channel) {
36 | this.channel = (short) channel;
37 | }
38 |
39 | public short getChannel() {
40 | return channel;
41 | }
42 |
43 | public static SpiChannel getByNumber(short channelNumber){
44 | return getByNumber((int)channelNumber);
45 | }
46 |
47 | public static SpiChannel getByNumber(int channelNumber){
48 | for(SpiChannel channel : SpiChannel.values()){
49 | if(channel.getChannel() == channelNumber){
50 | return channel;
51 | }
52 | }
53 | return null;
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/spi/SpiMode.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.spi;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : SpiMode.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | public enum SpiMode {
31 | MODE_0(0), MODE_1(1), MODE_2(2), MODE_3(3);
32 |
33 | private final short mode;
34 |
35 | private SpiMode(int mode) {
36 | this.mode = (short) mode;
37 | }
38 |
39 | public short getMode() {
40 | return mode;
41 | }
42 |
43 | public static SpiMode getByNumber(short modeNumber){
44 | return getByNumber((int)modeNumber);
45 | }
46 |
47 | public static SpiMode getByNumber(int modeNumber){
48 | for(SpiMode item : SpiMode.values()){
49 | if(item.getMode() == modeNumber){
50 | return item;
51 | }
52 | }
53 | return null;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/w1/W1Device.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.w1;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : W1Device.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | import java.io.IOException;
31 |
32 | /**
33 | * @author Peter Schuebl
34 | */
35 | public interface W1Device {
36 |
37 | /**
38 | * Returns the name (id/serial number) of the device e.g. 28-00000698ebb1.
39 | * @return the unique device name.
40 | */
41 | String getId();
42 |
43 | /**
44 | * Returns a human readable name.
45 | * @return the human readable name, defaults to ID
46 | */
47 | String getName();
48 |
49 | /**
50 | * Returns the type/family of the device.
51 | * @return device type, never null.
52 | */
53 | int getFamilyId();
54 |
55 | /**
56 | * Gets the current Value = content of w1_slave file
57 | * @return
58 | */
59 | String getValue() throws IOException;
60 |
61 | /**
62 | * W1Device should be considered equal based on their ID
63 | */
64 | boolean equals(Object obj);
65 |
66 | int hashCode();
67 | }
68 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/w1/W1DeviceType.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.w1;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : W1DeviceType.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | import java.io.File;
31 |
32 | /**
33 | *
34 | * http://en.wikipedia.org/wiki/1-Wire
35 | * @author Peter Schuebl
36 | */
37 | public interface W1DeviceType {
38 |
39 | /**
40 | * Returns the FID of the W1 device e.g. 0x28 for DS18B20
41 | *
42 | * Each device has 48 bit (six bytes) globally unique address where last eight bits are
43 | * CRC of first 56 bits. First byte stores a device family code, that identifies device type.
44 | *
45 | * @return the family id of the device
46 | */
47 | int getDeviceFamilyCode();
48 |
49 | /**
50 | * Gets the implementation class of the device which must be a sub-class of W1Device
51 | * @return the implementation class
52 | */
53 | Class extends W1Device> getDeviceClass();
54 |
55 | /**
56 | * Creates a new instance of a concrete device.
57 | * @param deviceDir
58 | * @return
59 | */
60 | W1Device create(File deviceDir);
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/w1/W1MasterWatcher.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.w1;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : W1MasterWatcher.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | /**
31 | * Monitor the master for device changes (added/removed)
32 | * @author Peter Schuebl
33 | */
34 | public class W1MasterWatcher {
35 |
36 | @SuppressWarnings("unused")
37 | private W1Master w1Master;
38 |
39 | public W1MasterWatcher(final W1Master w1Master) {
40 | this.w1Master = w1Master;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/w1/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * http://lxr.free-electrons.com/source/drivers/w1/slaves/w1_therm.c
3 | * http://lxr.free-electrons.com/source/drivers/w1/w1_family.h
4 | * @author Peter Schuebl
5 | */
6 | package com.pi4j.io.w1;
7 |
8 | /*
9 | * #%L
10 | * **********************************************************************
11 | * ORGANIZATION : Pi4J
12 | * PROJECT : Pi4J :: Java Library (Core)
13 | * FILENAME : package-info.java
14 | *
15 | * This file is part of the Pi4J project. More information about
16 | * this project can be found here: https://pi4j.com/
17 | * **********************************************************************
18 | * %%
19 | * Copyright (C) 2012 - 2021 Pi4J
20 | * %%
21 | * Licensed under the Apache License, Version 2.0 (the "License");
22 | * you may not use this file except in compliance with the License.
23 | * You may obtain a copy of the License at
24 | *
25 | * http://www.apache.org/licenses/LICENSE-2.0
26 | *
27 | * Unless required by applicable law or agreed to in writing, software
28 | * distributed under the License is distributed on an "AS IS" BASIS,
29 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30 | * See the License for the specific language governing permissions and
31 | * limitations under the License.
32 | * #L%
33 | */
34 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/io/wdt/WDTimer.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.wdt;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : WDTimer.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | import java.io.IOException;
31 |
32 | /**
33 | * This is abstraction of WatchDog.
34 | *
35 | * @author zerog
36 | */
37 | public interface WDTimer {
38 |
39 | void open() throws IOException;
40 |
41 | void setTimeOut(int timeout) throws IOException;
42 |
43 | int getTimeOut() throws IOException;
44 |
45 | void heartbeat() throws IOException;
46 |
47 | void disable() throws IOException;
48 |
49 | void close() throws IOException;
50 | }
51 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/jni/AnalogInputListener.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.jni;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : AnalogInputListener.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | /**
32 | *
This interface implements the callback event handler for GPIO analog input value changes.
33 | *
34 | * @see https://pi4j.com/
35 | * @author Robert Savage (http://www.savagehomeautomation.com)
37 | */
38 | public interface AnalogInputListener extends java.util.EventListener {
39 | void pinValueChange(AnalogInputEvent event);
40 | }
41 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/jni/SerialInterruptListener.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.jni;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : SerialInterruptListener.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | /**
32 | *
This interface implements the callback event handler for serial interrupt data receive events.
33 | *
34 | * @see https://pi4j.com/
35 | * @author Robert Savage (http://www.savagehomeautomation.com)
37 | */
38 | public interface SerialInterruptListener extends java.util.EventListener {
39 | void onDataReceive(SerialInterruptEvent event);
40 | }
41 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/jni/WDT.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.jni;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : WDT.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | import com.pi4j.util.NativeLibraryLoader;
31 |
32 | /**
33 | *
34 | * @author Zerog
35 | */
36 | public class WDT {
37 |
38 | private WDT() {
39 | }
40 |
41 | static {
42 | // Load the platform library
43 | NativeLibraryLoader.load("libpi4j.so", "pi4j");
44 | }
45 |
46 | public static native int open(String file);
47 |
48 | public static native int close(int fd);
49 |
50 | public static native int disable(int fd);
51 |
52 | public static native int getTimeOut(int fd);
53 |
54 | public static native int setTimeOut(int fd, int timeout);
55 |
56 | public static native int ping(int fd);
57 |
58 |
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/platform/PlatformAlreadyAssignedException.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.platform;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : PlatformAlreadyAssignedException.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | /**
31 | *
32 | * This exception is thrown if a platform assignment is attempted when a
33 | * platform instance has already been assigned.
34 | *
35 | *
36 | * @see https://pi4j.com/
37 | * @author Robert Savage (http://www.savagehomeautomation.com)
39 | */
40 | public class PlatformAlreadyAssignedException extends Exception {
41 |
42 | private static final long serialVersionUID = -2812520138732144154L;
43 |
44 | /**
45 | * Default Constructor
46 | *
47 | * @param platform
48 | */
49 | public PlatformAlreadyAssignedException(Platform platform){
50 | super("The Pi4J platform has already been assigned as '" + platform.label() +
51 | "'; cannot change platforms once a platform assignment has been made.");
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/wiringpi/GpioInterruptCallback.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.wiringpi;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioInterruptCallback.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | public interface GpioInterruptCallback {
32 | void callback(int pin);
33 | }
34 |
--------------------------------------------------------------------------------
/pi4j-core/src/main/java/com/pi4j/wiringpi/GpioInterruptListener.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.wiringpi;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioInterruptListener.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | /**
32 | *
This interface implements the callback event handler for GPIO interrupt state changes.
33 | *
34 | *
35 | * Before using the Pi4J library, you need to ensure that the Java VM in configured with access to
36 | * the following system libraries:
37 | *
38 | *
pi4j
39 | *
wiringPi
40 | *
41 | *
This library depends on the wiringPi native system library. (developed by
42 | * Gordon Henderson @ http://wiringpi.com/)
43 | *
44 | *
45 | *
46 | * @see https://pi4j.com/
47 | * @author Robert Savage (http://www.savagehomeautomation.com)
49 | */
50 | public interface GpioInterruptListener extends java.util.EventListener {
51 | void pinStateChange(GpioInterruptEvent event);
52 | }
53 |
--------------------------------------------------------------------------------
/pi4j-core/src/test/java/com/pi4j/IntegrationTests.java:
--------------------------------------------------------------------------------
1 | package com.pi4j;
2 |
3 | /*-
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : IntegrationTests.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | public interface IntegrationTests {
31 | // JUNIT CATEGORY MARKER INTERFACE
32 | }
33 |
--------------------------------------------------------------------------------
/pi4j-core/src/test/java/com/pi4j/io/gpio/impl/GpioControllerImplTest.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.impl;
2 |
3 | /*-
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : GpioControllerImplTest.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 | import com.pi4j.io.gpio.*;
31 | import com.pi4j.io.gpio.exception.PinProviderException;
32 | import org.junit.Before;
33 | import org.junit.Test;
34 |
35 | /**
36 | * Unit test for the {@link GpioControllerImpl}.
37 | */
38 | public class GpioControllerImplTest {
39 | @Before
40 | public void setUp() {
41 | GpioProvider provider = new SimulatedGpioProvider();
42 | GpioFactory.setDefaultProvider(provider);
43 | }
44 |
45 | //@Test(expected = PinProviderException.class)
46 | @Test
47 | public void testProvisionPin() {
48 | GpioController controller = new GpioControllerImpl();
49 | controller.provisionPin(RaspiPin.GPIO_00, PinMode.DIGITAL_OUTPUT);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/pi4j-core/src/test/java/com/pi4j/io/gpio/test/MockGpioProvider.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.gpio.test;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : MockGpioProvider.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import com.pi4j.io.gpio.GpioProvider;
32 | import com.pi4j.io.gpio.GpioProviderBase;
33 | import com.pi4j.io.gpio.Pin;
34 | import com.pi4j.io.gpio.PinState;
35 |
36 | public class MockGpioProvider extends GpioProviderBase implements GpioProvider {
37 |
38 | public static final String NAME = "MockGpioProvider";
39 |
40 | @Override
41 | public String getName() {
42 | return NAME;
43 | }
44 |
45 | public void setMockState(Pin pin, PinState state) {
46 | // cache pin state
47 | getPinCache(pin).setState(state);
48 |
49 | // dispatch event
50 | dispatchPinDigitalStateChangeEvent(pin, state);
51 | }
52 |
53 | public void setMockAnalogValue(Pin pin, double value) {
54 | // cache pin state
55 | getPinCache(pin).setAnalogValue(value);
56 |
57 | // dispatch event
58 | dispatchPinAnalogValueChangeEvent(pin, value);
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/pi4j-core/src/test/java/com/pi4j/io/w1/W1DummyDeviceType.java:
--------------------------------------------------------------------------------
1 | package com.pi4j.io.w1;
2 |
3 | /*
4 | * #%L
5 | * **********************************************************************
6 | * ORGANIZATION : Pi4J
7 | * PROJECT : Pi4J :: Java Library (Core)
8 | * FILENAME : W1DummyDeviceType.java
9 | *
10 | * This file is part of the Pi4J project. More information about
11 | * this project can be found here: https://pi4j.com/
12 | * **********************************************************************
13 | * %%
14 | * Copyright (C) 2012 - 2021 Pi4J
15 | * %%
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | * #L%
28 | */
29 |
30 |
31 | import java.io.File;
32 |
33 | /**
34 | * @author Peter Schuebl
35 | */
36 | public class W1DummyDeviceType implements W1DeviceType {
37 |
38 | public static final int FAMILY_ID = 0xFE;
39 |
40 | @Override
41 | public int getDeviceFamilyCode() {
42 | return FAMILY_ID;
43 | }
44 |
45 | @Override
46 | public Class extends W1Device> getDeviceClass() {
47 | return W1DummyDevice.class;
48 | }
49 |
50 | @Override
51 | public W1DummyDevice create(final File deviceDir) {
52 | return new W1DummyDevice(deviceDir);
53 | }
54 |
55 | static class W1DummyDevice extends W1BaseDevice {
56 |
57 | @Override
58 | public int getFamilyId() {
59 | return FAMILY_ID;
60 | }
61 |
62 | public W1DummyDevice(final File deviceDir) {
63 | super(deviceDir);
64 | }
65 |
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/pi4j-core/src/test/resources/META-INF/services/com.pi4j.io.w1.W1DeviceType:
--------------------------------------------------------------------------------
1 | com.pi4j.io.w1.W1DummyDeviceType
--------------------------------------------------------------------------------
/pi4j-core/src/test/resources/w1/sys/bus/w1/devices/28-00000698ebb1/name:
--------------------------------------------------------------------------------
1 | 28-00000698ebb1
--------------------------------------------------------------------------------
/pi4j-core/src/test/resources/w1/sys/bus/w1/devices/28-00000698ebb1/uevent:
--------------------------------------------------------------------------------
1 | DRIVER=w1_slave_driver
2 | W1_FID=28
3 | W1_SLAVE_ID=00000000000000000698EBB1
--------------------------------------------------------------------------------
/pi4j-core/src/test/resources/w1/sys/bus/w1/devices/28-00000698ebb1/w1_slave:
--------------------------------------------------------------------------------
1 | 51 01 4b 46 7f ff 0f 10 fe : crc=fe YES
2 | 51 01 4b 46 7f ff 0f 10 fe t=21062
3 |
--------------------------------------------------------------------------------
/pi4j-core/src/test/resources/w1/sys/bus/w1/devices/28-00000698ebb2/name:
--------------------------------------------------------------------------------
1 | 28-00000698ebb2
--------------------------------------------------------------------------------
/pi4j-core/src/test/resources/w1/sys/bus/w1/devices/28-00000698ebb2/uevent:
--------------------------------------------------------------------------------
1 | DRIVER=w1_slave_driver
2 | W1_FID=28
3 | W1_SLAVE_ID=00000000000000000698EBB2
--------------------------------------------------------------------------------
/pi4j-core/src/test/resources/w1/sys/bus/w1/devices/28-00000698ebb2/w1_slave:
--------------------------------------------------------------------------------
1 | 80 01 4b 46 7f ff 10 10 c6 : crc=c6 YES
2 | 80 01 4b 46 7f ff 10 10 c6 t=24000
--------------------------------------------------------------------------------
/pi4j-core/src/test/resources/w1/sys/bus/w1/devices/FE-00000698ebb3/name:
--------------------------------------------------------------------------------
1 | FE-00000698ebb3 Dummy Device
--------------------------------------------------------------------------------
/pi4j-core/src/test/resources/w1/sys/bus/w1/devices/FE-00000698ebb3/uevent:
--------------------------------------------------------------------------------
1 | DRIVER=w1_slave_driver
2 | W1_FID=FE
3 | W1_SLAVE_ID=00000000000000000698EBB3
--------------------------------------------------------------------------------
/pi4j-core/src/test/resources/w1/sys/bus/w1/devices/FE-00000698ebb3/w1_slave:
--------------------------------------------------------------------------------
1 | 51 01 4b 46 7f ff 0f 10 fe : crc=fe YES
2 | 51 01 4b 46 7f ff 0f 10 fe t=21062
3 |
--------------------------------------------------------------------------------
/pi4j-core/src/test/resources/w1/sys/bus/w1/devices/w1_bus_master1/w1_master_slaves:
--------------------------------------------------------------------------------
1 | 28-00000698ebb1
2 | 28-00000698ebb2
--------------------------------------------------------------------------------
/pi4j-distribution/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/pi4j-distribution/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 |
--------------------------------------------------------------------------------
/pi4j-distribution/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | pi4j-distribution
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.m2e.core.maven2Builder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.m2e.core.maven2Nature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/pi4j-distribution/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=UTF-8
3 |
--------------------------------------------------------------------------------
/pi4j-distribution/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
3 | org.eclipse.jdt.core.compiler.compliance=1.7
4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
5 | org.eclipse.jdt.core.compiler.source=1.7
6 |
--------------------------------------------------------------------------------
/pi4j-distribution/.settings/org.eclipse.m2e.core.prefs:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/pi4j-distribution/src/assembly/distribution.xml:
--------------------------------------------------------------------------------
1 |
2 | distribution-archive
3 |
4 | tar.gz
5 | tar.bz2
6 | zip
7 |
8 |
9 |
10 | target/distro-contents
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/pi4j-distribution/src/deb/control/control:
--------------------------------------------------------------------------------
1 | Package: pi4j
2 | Version: [[version]]
3 | Section: misc
4 | Priority: optional
5 | Architecture: all
6 | Depends:
7 | Maintainer: Pi4J Support
8 | Description: Java library for IO access on the Raspberry Pi platform
9 | Distribution: development
--------------------------------------------------------------------------------
/pi4j-distribution/src/deb/control/postinst:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | case "$1" in
6 | configure)
7 | ln --force --symbolic /opt/pi4j/bin/pi4j /usr/bin/pi4j
8 | ;;
9 | abort-upgrade|abort-remove|abort-deconfigure)
10 | echo "$1"
11 | ;;
12 | *)
13 | echo "postinst called with unknown argument \`\$1'" >&2
14 | exit 0
15 | ;;
16 | esac
17 |
18 | # SET EXECUTABLE PERMISSIONS FOR EXAMPLE BUILD SCRIPTS
19 | chmod -f -R a+x /opt/pi4j/examples/build
20 |
21 | # SET EXECUTABLE PERMISSIONS FOR EXAMPLE RUN SCRIPTS
22 | chmod -f -R a+x /opt/pi4j/examples/run
23 |
--------------------------------------------------------------------------------
/pi4j-distribution/src/deb/control/postrm:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | case "$1" in
6 | remove)
7 | rm -f /usr/bin/pi4j
8 | rm -f -r /opt/pi4j
9 | ;;
10 | purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
11 | echo $1
12 | ;;
13 | *)
14 | echo "postinst called with unknown argument \`\$1'" >&2
15 | exit 0
16 | ;;
17 | esac
--------------------------------------------------------------------------------
/pi4j-distribution/src/deb/control/preinst:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # CREATE DIRECTORIES
4 | mkdir -p /opt/pi4j
5 | mkdir -p /opt/pi4j/lib
6 | mkdir -p /opt/pi4j/bin
7 | mkdir -p /opt/pi4j/examples
8 |
9 | # SET READ+WRITE PERMISSIONS FOR EXAMPLES DIRECTORY
10 | chmod -f -R a+rw /opt/pi4j/examples
11 |
12 |
13 |
--------------------------------------------------------------------------------
/pi4j-distribution/src/deb/control/prerm:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
--------------------------------------------------------------------------------
/pi4j-distribution/src/scripts/deb-s3:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | deb-s3 upload --arch=armhf --sign=team@pi4j.com --codename=wheezy --component=rpi --bucket=repository.pi4j.com --prefix repo/ pi4j-2.0-SNAPSHOT.deb
3 |
--------------------------------------------------------------------------------
/pi4j-distribution/src/scripts/install:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | ######################################
3 | # THE Pi4J PROJECT - INSTALL SCRIPT
4 | ######################################
5 | #
6 | # curl -ssL https://pi4j.com/install | sudo bash
7 | #
8 |
9 | # download and install the Pi4J GPG public key
10 | echo ====================================================
11 | echo INSTALLING Pi4J GPG PUBLIC KEY
12 | echo ====================================================
13 | curl -ssL https://pi4j.com/pi4j.gpg | apt-key add -
14 |
15 | # download and install the pi4j apt repository list
16 | echo ====================================================
17 | echo ADDING Pi4J APT REPOSITORY
18 | echo ====================================================
19 | sudo curl -sSL https://pi4j.com/pi4j.list --output /etc/apt/sources.list.d/pi4j.list
20 |
21 | # update the apt package list
22 | echo ====================================================
23 | echo UPDATING APT REPOSITORIES
24 | echo ====================================================
25 | apt-get update -o Dir::Etc::sourcelist="sources.list.d/pi4j.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
26 |
27 | # download and install the Pi4J project
28 | echo ====================================================
29 | echo INSTALLING Pi4J
30 | echo ====================================================
31 | apt-get install pi4j
32 |
33 | echo ====================================================
34 | echo Pi4J INSTALLATION COMPLETE
35 | echo ====================================================
36 | echo
37 | echo The Pi4J JAR files are located at:
38 | echo /opt/pi4j/lib
39 | echo
40 | echo Example Java programs are located at:
41 | echo /opt/pi4j/examples
42 | echo
43 | echo You can compile the examples using this script:
44 | echo sudo /opt/pi4j/examples/build
45 | echo
46 | echo Please see https://pi4j.com for more information.
47 | echo
48 |
--------------------------------------------------------------------------------
/pi4j-distribution/src/scripts/pi4j.gpg:
--------------------------------------------------------------------------------
1 | -----BEGIN PGP PUBLIC KEY BLOCK-----
2 | Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
3 | Comment: GPGTools - https://gpgtools.org
4 |
5 | mQENBFPdjn4BCAC3I8N1jsnZShKvg8Sx6hCGHY1Bhsct3sdB+OBA4nky813PyOG+
6 | kYp8hJj/BMIuilgeAvywlnEPO1xK85SwXHCx2wXrqECxNdDfSa1nAdBPyYMs1iEz
7 | u2kN83bh6e5kPk/jWjmE/qmWi55XHGWGe2gUZqVlKYQ6YwqBaPN7kUPD7z2/Mip8
8 | 3HDEG6E6mtUXJlEICKBretXA1llvEgAwP6e5KII9PIFHwh7NK31W72wjNntGrefp
9 | GPuf45C1SoBXcGcW06CQNXgzFTnIRjFkvdzdaTSgtFmJuyGLeofOAb9NpcwUcyp8
10 | hHOCv0ytnDhpulVAYGv7O3ouXcQEsExWNMr5ABEBAAG0IFRoZSBQaTRKIFByb2pl
11 | Y3QgPHRlYW1AcGk0ai5jb20+iQE3BBMBCgAhBQJT3Y5+AhsDBQsJCAcDBRUKCQgL
12 | BRYCAwEAAh4BAheAAAoJEFczz1NJ6v/mtMkIAJmUpsgakrdjC4W6mtkGuIYwAxNI
13 | otBeodd4jFJPbOHtvbZCeYhch/9hMsluVNlFhPjwMKcUEL/kwkfsLqxVy+wWK1L1
14 | POOeR3IQg/9FUpiup0UFene1CNF28wZMBv5rTEpBA27e/8unWYbjQVvCCBTEOzDD
15 | 7/EKPH2WslSe96gz13boU6I5rMGHyHT6xdPLmieHfvWeo1uMJVhJAHtgEKZ+XhSo
16 | pRhjqzbsY20gjV5RgEYrESsybCutDrt9l+OCTft7+WKy5AHIIgJFlDogdkmOdq+1
17 | 8gfJnZrzw+2P/JKNIxzh6o6jvQ1tOYpWd0xdSomJQShvxl3YBLXjRrIe7NW5AQ0E
18 | U92OfgEIAJ6NtqOVQHQwqHaP+Pz7moig57C6kTUpnOdr5cBFyOC5ehGXZyivp99P
19 | zXDjfYODqcsBdF2N+g4cIbTVXtcrSeA2ad0hFcKTUgIqIXtCZrQJ8TBP0FhebwTi
20 | vcfWpy9yb1kaO8mFUF/nlbcJ9dgIRNTS//8z0y4IMh/Zo/UZNqRb9fPtG5KIfzFA
21 | NmXukXJkpV98WpU7xqbVdXUwa2ACS/aYZjiY9xy8t3XacQolxEEG4zci2rTP5ia7
22 | ain2MIt/5fbJDg440z0joYrK4jUOU3+gKDMiGkxq8/wTzhyS2gxrQ9gBUVC9iQXc
23 | kR3kPBspYcJNJC1ZgkoK7ZkbBbdWAh8AEQEAAYkBHwQYAQoACQUCU92OfgIbDAAK
24 | CRBXM89TSer/5hYrB/9uK1FbPJs3W/15EWZpJFoq+5wNLB4fPxgDu27LzQI9FHHy
25 | 5GzzrN/oDdQXYiHQ4yorHjtp92CV7R2qmVIlJyrkxLDoX81fGFqZvLxwveBFC0Rv
26 | Vo2edkqUImr1kMMWDVs76iIjYofnZOzVn4LKYBGR9VLr5dn5XE6kSF+kkxRIa3UJ
27 | 0do/3MyPhfJm8C19CPTCaHal2NmGFPiSFHKV399sz7dFQpZG43TKjgKLqOdXUPy6
28 | ndZWL7yAgmLxDd29KCaS8zHbZh6KNLQGpQFyEuqu4F7csBas5Wz10AErIKOj1rJW
29 | k1DKErT8HF5D5SVEBqkGHBcEAlX0AMberLaEst9i
30 | =3cgP
31 | -----END PGP PUBLIC KEY BLOCK-----
32 |
--------------------------------------------------------------------------------
/pi4j-distribution/src/scripts/pi4j.list:
--------------------------------------------------------------------------------
1 | deb https://repository.pi4j.com wheezy rpi
2 |
--------------------------------------------------------------------------------
/pi4j-distribution/src/scripts/uninstall:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | ######################################
3 | # THE Pi4J PROJECT - UNINSTALL SCRIPT
4 | ######################################
5 | #
6 | # curl -sSL https://pi4j.com/uninstall | sudo bash
7 | #
8 |
9 | # uninstall the pi4j project package
10 | echo ====================================================
11 | echo UNINSTALLING Pi4J
12 | echo ====================================================
13 | apt-get remove pi4j -y
14 |
15 | # remove pi4j from apt repository list
16 | echo ====================================================
17 | echo REMOVING Pi4J APT REPOSITORY
18 | echo ====================================================
19 | rm /etc/apt/sources.list.d/pi4j.list
20 |
21 | # remove the Pi4J GPG public key
22 | echo ====================================================
23 | echo REMOVING Pi4J GPG PUBLIC KEY
24 | echo ====================================================
25 | apt-key del team@pi4j.com
26 |
27 | # update the apt package list
28 | echo ====================================================
29 | echo UPDATING APT REPOSITORIES
30 | echo ====================================================
31 | apt-get update
32 |
33 | echo ====================================================
34 | echo Pi4J UNINSTALL COMPLETE
35 | echo ====================================================
36 |
37 |
38 |
--------------------------------------------------------------------------------
/pi4j-example/src/main/java/WiringPiPinAltExample.java:
--------------------------------------------------------------------------------
1 | /*
2 | * #%L
3 | * **********************************************************************
4 | * ORGANIZATION : Pi4J
5 | * PROJECT : Pi4J :: Java Examples
6 | * FILENAME : WiringPiPinAltExample.java
7 | *
8 | * This file is part of the Pi4J project. More information about
9 | * this project can be found here: https://pi4j.com/
10 | * **********************************************************************
11 | * %%
12 | * Copyright (C) 2012 - 2021 Pi4J
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 | import com.pi4j.wiringpi.Gpio;
28 |
29 |
30 | public class WiringPiPinAltExample {
31 |
32 | public static void main(String args[]) throws InterruptedException {
33 | System.out.println("<--Pi4J--> GPIO ALT MODE test program");
34 |
35 | // setup wiringPi
36 | if (Gpio.wiringPiSetup() == -1) {
37 | System.out.println(" ==>> GPIO SETUP FAILED");
38 | return;
39 | }
40 |
41 | // NOTE, this example does not really do anything visible, its just an usage example of settings ALT pin modes
42 |
43 | // iterate through all the available pin modes
44 | Gpio.pinMode (7, Gpio.INPUT);
45 | Gpio.pinMode (7, Gpio.OUTPUT);
46 | Gpio.pinMode (7, Gpio.ALT0);
47 | Gpio.pinMode (7, Gpio.ALT1);
48 | Gpio.pinMode (7, Gpio.ALT2);
49 | Gpio.pinMode (7, Gpio.ALT3);
50 | Gpio.pinMode (7, Gpio.ALT4);
51 | Gpio.pinMode (7, Gpio.ALT5);
52 |
53 | System.out.println("Exiting WiringPiPinAltExample");
54 | }
55 | }
56 |
57 |
--------------------------------------------------------------------------------
/pi4j-example/src/main/java/WiringPiSerialExample.java:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * #%L
4 | * **********************************************************************
5 | * ORGANIZATION : Pi4J
6 | * PROJECT : Pi4J :: Java Examples
7 | * FILENAME : WiringPiSerialExample.java
8 | *
9 | * This file is part of the Pi4J project. More information about
10 | * this project can be found here: https://pi4j.com/
11 | * **********************************************************************
12 | * %%
13 | * Copyright (C) 2012 - 2021 Pi4J
14 | * %%
15 | * Licensed under the Apache License, Version 2.0 (the "License");
16 | * you may not use this file except in compliance with the License.
17 | * You may obtain a copy of the License at
18 | *
19 | * http://www.apache.org/licenses/LICENSE-2.0
20 | *
21 | * Unless required by applicable law or agreed to in writing, software
22 | * distributed under the License is distributed on an "AS IS" BASIS,
23 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 | * See the License for the specific language governing permissions and
25 | * limitations under the License.
26 | * #L%
27 | */
28 | import com.pi4j.wiringpi.Serial;
29 |
30 | public class WiringPiSerialExample {
31 |
32 | public static void main(String args[]) throws InterruptedException {
33 |
34 | System.out.println("<--Pi4J--> SERIAL test program");
35 |
36 | // open serial port for communication
37 | int fd = Serial.serialOpen(Serial.DEFAULT_COM_PORT, 38400);
38 | if (fd == -1) {
39 | System.out.println(" ==>> SERIAL SETUP FAILED");
40 | return;
41 | }
42 |
43 | // infinite loop
44 | while(true) {
45 |
46 | // send test ASCII message
47 | Serial.serialPuts(fd, "TEST\r\n");
48 |
49 | // display data received to console
50 | int dataavail = Serial.serialDataAvail(fd);
51 | while(dataavail > 0) {
52 | byte data = Serial.serialGetByte(fd);
53 | System.out.print(data);
54 | dataavail = Serial.serialDataAvail(fd);
55 | }
56 |
57 | // wash, rinse, repeat
58 | Thread.sleep(1000);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/pi4j-example/src/main/java/WiringPiSoftPWMExample.java:
--------------------------------------------------------------------------------
1 | /*
2 | * #%L
3 | * **********************************************************************
4 | * ORGANIZATION : Pi4J
5 | * PROJECT : Pi4J :: Java Examples
6 | * FILENAME : WiringPiSoftPWMExample.java
7 | *
8 | * This file is part of the Pi4J project. More information about
9 | * this project can be found here: https://pi4j.com/
10 | * **********************************************************************
11 | * %%
12 | * Copyright (C) 2012 - 2021 Pi4J
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 |
28 | import com.pi4j.wiringpi.SoftPwm;
29 |
30 | public class WiringPiSoftPWMExample {
31 |
32 | public static void main(String[] args) throws InterruptedException {
33 |
34 | // initialize wiringPi library
35 | com.pi4j.wiringpi.Gpio.wiringPiSetup();
36 |
37 | // create soft-pwm pins (min=0 ; max=100)
38 | SoftPwm.softPwmCreate(1, 0, 100);
39 |
40 | // continuous loop
41 | while (true) {
42 | // fade LED to fully ON
43 | for (int i = 0; i <= 100; i++) {
44 | SoftPwm.softPwmWrite(1, i);
45 | Thread.sleep(100);
46 | }
47 |
48 | // fade LED to fully OFF
49 | for (int i = 100; i >= 0; i--) {
50 | SoftPwm.softPwmWrite(1, i);
51 | Thread.sleep(100);
52 | }
53 | }
54 |
55 | // make sure to stop software PWM driver/thread if you done with it.
56 | //SoftPwm.softPwmStop(1);
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/pi4j-example/src/main/java/run:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e # exit on error
3 |
4 | ###
5 | # #%L
6 | # **********************************************************************
7 | # ORGANIZATION : Pi4J
8 | # PROJECT : Pi4J :: Java Examples (for RaspberryPi)
9 | # FILENAME : run
10 | #
11 | # This file is part of the Pi4J project. More information about
12 | # this project can be found here: https://pi4j.com/
13 | # **********************************************************************
14 | # %%
15 | # Copyright (C) 2012 - 2019 Pi4J
16 | # %%
17 | #
18 | # Licensed under the Apache License, Version 2.0 (the "License");
19 | # you may not use this file except in compliance with the License.
20 | # You may obtain a copy of the License at
21 | #
22 | # http://www.apache.org/licenses/LICENSE-2.0
23 | #
24 | # Unless required by applicable law or agreed to in writing, software
25 | # distributed under the License is distributed on an "AS IS" BASIS,
26 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27 | # See the License for the specific language governing permissions and
28 | # limitations under the License.
29 | #
30 | # #L%
31 | ###
32 |
33 | # CHECK FOR MISSING CLI ARGUMENTS
34 | if [ $# -eq 0 ]; then
35 | echo
36 | echo "No program name argument supplied!"
37 | echo "Use 'run '"
38 | echo
39 | exit 1;
40 | fi
41 |
42 | # DEFINED APP NAMESPACE
43 | NAMESPACE=
44 |
45 | # GET PROGRAM NAME FROM FIRST CLI ARG
46 | NAME=$1;
47 |
48 | # REMOVE .java FILE EXTENSION FROM NAME ARG IF EXISTS
49 | NAME=${NAME/.java/}
50 |
51 | # REMOVE NAMESPACE FROM NAME ARG IF EXISTS
52 | NAME=${NAME#$NAMESPACE}
53 |
54 | # LAUNCH PI4J SAMPLE PROGRAM
55 | set -x #echo on
56 | sudo java -classpath .:classes:'*':classes:/opt/pi4j/lib/'*' $NAMESPACE$NAME $@
57 |
--------------------------------------------------------------------------------
/pi4j-native/.gitignore:
--------------------------------------------------------------------------------
1 | target/
--------------------------------------------------------------------------------
/pi4j-native/src/main/native/com_pi4j_jni_Exception.h:
--------------------------------------------------------------------------------
1 | /*
2 | * #%L
3 | * **********************************************************************
4 | * ORGANIZATION : Pi4J
5 | * PROJECT : Pi4J :: JNI Native Library
6 | * FILENAME : com_pi4j_jni_Exception.h
7 | *
8 | * This file is part of the Pi4J project. More information about
9 | * this project can be found here: https://pi4j.com/
10 | * **********************************************************************
11 | * %%
12 | * Copyright (C) 2012 - 2021 Pi4J
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 | /* DO NOT EDIT THIS FILE - it is machine generated */
28 | #include
29 | /* Header for class com_pi4j_jni_Serial */
30 |
31 | #ifndef _Included_com_pi4j_jni_Exception
32 | #define _Included_com_pi4j_jni_Exception
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 |
37 | jint throwNoClassDefError( JNIEnv *env, char *message );
38 | jint throwIOException( JNIEnv *env, char *message );
39 | jint throwUnsupportedOperationException( JNIEnv *env, char *message );
40 |
41 | #ifdef __cplusplus
42 | }
43 | #endif
44 | #endif
45 |
--------------------------------------------------------------------------------
/pi4j-native/src/main/native/com_pi4j_jni_Loader.h:
--------------------------------------------------------------------------------
1 | /*
2 | * #%L
3 | * **********************************************************************
4 | * ORGANIZATION : Pi4J
5 | * PROJECT : Pi4J :: JNI Native Library
6 | * FILENAME : com_pi4j_jni_Loader.h
7 | *
8 | * This file is part of the Pi4J project. More information about
9 | * this project can be found here: https://pi4j.com/
10 | * **********************************************************************
11 | * %%
12 | * Copyright (C) 2012 - 2021 Pi4J
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 | /* DO NOT EDIT THIS FILE - it is machine generated */
28 | #include
29 | /* Header for class com_pi4j_jni_Loader */
30 |
31 | #ifndef _Included_com_pi4j_jni_Loader
32 | #define _Included_com_pi4j_jni_Loader
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 |
37 | #ifdef __cplusplus
38 | }
39 | #endif
40 | #endif
41 |
--------------------------------------------------------------------------------
/pi4j-native/src/main/native/com_pi4j_wiringpi_Nes.c:
--------------------------------------------------------------------------------
1 | /*
2 | * #%L
3 | * **********************************************************************
4 | * ORGANIZATION : Pi4J
5 | * PROJECT : Pi4J :: JNI Native Library
6 | * FILENAME : com_pi4j_wiringpi_Nes.c
7 | *
8 | * This file is part of the Pi4J project. More information about
9 | * this project can be found here: https://pi4j.com/
10 | * **********************************************************************
11 | * %%
12 | * Copyright (C) 2012 - 2021 Pi4J
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 | #include
28 | #include
29 | #include "com_pi4j_wiringpi_Nes.h"
30 |
31 | /* Source for com_pi4j_wiringpi_Nes */
32 |
33 | /*
34 | * Class: com_pi4j_wiringpi_Nes
35 | * Method: setupNesJoystick
36 | * Signature: (III)I
37 | */
38 | JNIEXPORT jint JNICALL Java_com_pi4j_wiringpi_Nes_setupNesJoystick
39 | (JNIEnv *env, jclass class, jint dPin, jint cPin, jint lPin)
40 | {
41 | return setupNesJoystick(dPin, cPin, lPin);
42 | }
43 |
44 | /*
45 | * Class: com_pi4j_wiringpi_Nes
46 | * Method: readNesJoystick
47 | * Signature: (I)I
48 | */
49 | JNIEXPORT jint JNICALL Java_com_pi4j_wiringpi_Nes_readNesJoystick
50 | (JNIEnv *env, jclass class, jint joystick)
51 | {
52 | return readNesJoystick(joystick);
53 | }
54 |
--------------------------------------------------------------------------------
/pi4j-native/src/main/native/com_pi4j_wiringpi_Shift.c:
--------------------------------------------------------------------------------
1 | /*
2 | * #%L
3 | * **********************************************************************
4 | * ORGANIZATION : Pi4J
5 | * PROJECT : Pi4J :: JNI Native Library
6 | * FILENAME : com_pi4j_wiringpi_Shift.c
7 | *
8 | * This file is part of the Pi4J project. More information about
9 | * this project can be found here: https://pi4j.com/
10 | * **********************************************************************
11 | * %%
12 | * Copyright (C) 2012 - 2021 Pi4J
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 | #include
28 | #include
29 | #include
30 | #include "com_pi4j_wiringpi_Shift.h"
31 |
32 | /* Source for com_pi4j_wiringpi_Shift */
33 |
34 | /*
35 | * Class: com_pi4j_wiringpi_Shift
36 | * Method: shiftIn
37 | * Signature: (BBB)B
38 | */
39 | JNIEXPORT jbyte JNICALL Java_com_pi4j_wiringpi_Shift_shiftIn
40 | (JNIEnv *env, jclass class, jbyte dPin, jbyte cPin, jbyte order)
41 | {
42 | return shiftIn(dPin, cPin, order);
43 | }
44 |
45 | /*
46 | * Class: com_pi4j_wiringpi_Shift
47 | * Method: shiftOut
48 | * Signature: (BBBB)V
49 | */
50 | JNIEXPORT void JNICALL Java_com_pi4j_wiringpi_Shift_shiftOut
51 | (JNIEnv *env, jclass class, jbyte dPin, jbyte cPin, jbyte order, jbyte val)
52 | {
53 | shiftOut(dPin, cPin, order, val);
54 | }
55 |
--------------------------------------------------------------------------------
/pi4j-native/src/main/native/com_pi4j_wiringpi_Shift.h:
--------------------------------------------------------------------------------
1 | /*
2 | * #%L
3 | * **********************************************************************
4 | * ORGANIZATION : Pi4J
5 | * PROJECT : Pi4J :: JNI Native Library
6 | * FILENAME : com_pi4j_wiringpi_Shift.h
7 | *
8 | * This file is part of the Pi4J project. More information about
9 | * this project can be found here: https://pi4j.com/
10 | * **********************************************************************
11 | * %%
12 | * Copyright (C) 2012 - 2021 Pi4J
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 | /* DO NOT EDIT THIS FILE - it is machine generated */
28 | #include
29 | /* Header for class com_pi4j_wiringpi_Shift */
30 |
31 | #ifndef _Included_com_pi4j_wiringpi_Shift
32 | #define _Included_com_pi4j_wiringpi_Shift
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 | #undef com_pi4j_wiringpi_Shift_LSBFIRST
37 | #define com_pi4j_wiringpi_Shift_LSBFIRST 0L
38 | #undef com_pi4j_wiringpi_Shift_MSBFIRST
39 | #define com_pi4j_wiringpi_Shift_MSBFIRST 1L
40 | /*
41 | * Class: com_pi4j_wiringpi_Shift
42 | * Method: shiftIn
43 | * Signature: (BBB)B
44 | */
45 | JNIEXPORT jbyte JNICALL Java_com_pi4j_wiringpi_Shift_shiftIn
46 | (JNIEnv *, jclass, jbyte, jbyte, jbyte);
47 |
48 | /*
49 | * Class: com_pi4j_wiringpi_Shift
50 | * Method: shiftOut
51 | * Signature: (BBBB)V
52 | */
53 | JNIEXPORT void JNICALL Java_com_pi4j_wiringpi_Shift_shiftOut
54 | (JNIEnv *, jclass, jbyte, jbyte, jbyte, jbyte);
55 |
56 | #ifdef __cplusplus
57 | }
58 | #endif
59 | #endif
60 |
--------------------------------------------------------------------------------
/pi4j-native/src/main/native/com_pi4j_wiringpi_SoftPwm.c:
--------------------------------------------------------------------------------
1 | /*
2 | * #%L
3 | * **********************************************************************
4 | * ORGANIZATION : Pi4J
5 | * PROJECT : Pi4J :: JNI Native Library
6 | * FILENAME : com_pi4j_wiringpi_SoftPwm.c
7 | *
8 | * This file is part of the Pi4J project. More information about
9 | * this project can be found here: https://pi4j.com/
10 | * **********************************************************************
11 | * %%
12 | * Copyright (C) 2012 - 2021 Pi4J
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 | #include
28 | #include
29 | #include
30 | #include "com_pi4j_wiringpi_SoftPwm.h"
31 |
32 | /* Source for com_pi4j_wiringpi_SoftPwm */
33 |
34 | /*
35 | * Class: com_pi4j_wiringpi_SoftPwm
36 | * Method: softPwmCreate
37 | * Signature: (III)I
38 | */
39 | JNIEXPORT jint JNICALL Java_com_pi4j_wiringpi_SoftPwm_softPwmCreate
40 | (JNIEnv *env, jclass class, jint pin, jint value, jint range)
41 | {
42 | return softPwmCreate(pin, value, range);
43 | }
44 |
45 | /*
46 | * Class: com_pi4j_wiringpi_SoftPwm
47 | * Method: softPwmWrite
48 | * Signature: (II)V
49 | */
50 | JNIEXPORT void JNICALL Java_com_pi4j_wiringpi_SoftPwm_softPwmWrite
51 | (JNIEnv *env, jclass class, jint pin, jint value)
52 | {
53 | softPwmWrite(pin, value);
54 | }
55 |
56 | /*
57 | * Class: com_pi4j_wiringpi_SoftPwm
58 | * Method: softPwmStop
59 | * Signature: (I)V
60 | */
61 | JNIEXPORT void JNICALL Java_com_pi4j_wiringpi_SoftPwm_softPwmStop
62 | (JNIEnv *env, jclass class, jint pin)
63 | {
64 | softPwmStop(pin);
65 | }
66 |
--------------------------------------------------------------------------------
/pi4j-native/src/main/native/com_pi4j_wiringpi_SoftPwm.h:
--------------------------------------------------------------------------------
1 | /*
2 | * #%L
3 | * **********************************************************************
4 | * ORGANIZATION : Pi4J
5 | * PROJECT : Pi4J :: JNI Native Library
6 | * FILENAME : com_pi4j_wiringpi_SoftPwm.h
7 | *
8 | * This file is part of the Pi4J project. More information about
9 | * this project can be found here: https://pi4j.com/
10 | * **********************************************************************
11 | * %%
12 | * Copyright (C) 2012 - 2021 Pi4J
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 | /* DO NOT EDIT THIS FILE - it is machine generated */
28 | #include
29 | /* Header for class com_pi4j_wiringpi_SoftPwm */
30 |
31 | #ifndef _Included_com_pi4j_wiringpi_SoftPwm
32 | #define _Included_com_pi4j_wiringpi_SoftPwm
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 | /*
37 | * Class: com_pi4j_wiringpi_SoftPwm
38 | * Method: softPwmCreate
39 | * Signature: (III)I
40 | */
41 | JNIEXPORT jint JNICALL Java_com_pi4j_wiringpi_SoftPwm_softPwmCreate
42 | (JNIEnv *, jclass, jint, jint, jint);
43 |
44 | /*
45 | * Class: com_pi4j_wiringpi_SoftPwm
46 | * Method: softPwmWrite
47 | * Signature: (II)V
48 | */
49 | JNIEXPORT void JNICALL Java_com_pi4j_wiringpi_SoftPwm_softPwmWrite
50 | (JNIEnv *, jclass, jint, jint);
51 |
52 | /*
53 | * Class: com_pi4j_wiringpi_SoftPwm
54 | * Method: softPwmStop
55 | * Signature: (I)V
56 | */
57 | JNIEXPORT void JNICALL Java_com_pi4j_wiringpi_SoftPwm_softPwmStop
58 | (JNIEnv *, jclass, jint);
59 |
60 | #ifdef __cplusplus
61 | }
62 | #endif
63 | #endif
64 |
--------------------------------------------------------------------------------
/pi4j-native/src/main/native/com_pi4j_wiringpi_SoftTone.h:
--------------------------------------------------------------------------------
1 | /*
2 | * #%L
3 | * **********************************************************************
4 | * ORGANIZATION : Pi4J
5 | * PROJECT : Pi4J :: JNI Native Library
6 | * FILENAME : com_pi4j_wiringpi_SoftTone.h
7 | *
8 | * This file is part of the Pi4J project. More information about
9 | * this project can be found here: https://pi4j.com/
10 | * **********************************************************************
11 | * %%
12 | * Copyright (C) 2012 - 2021 Pi4J
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 | /* DO NOT EDIT THIS FILE - it is machine generated */
28 | #include
29 | /* Header for class com_pi4j_wiringpi_SoftTone */
30 |
31 | #ifndef _Included_com_pi4j_wiringpi_SoftTone
32 | #define _Included_com_pi4j_wiringpi_SoftTone
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 | /*
37 | * Class: com_pi4j_wiringpi_SoftTone
38 | * Method: softToneCreate
39 | * Signature: (I)I
40 | */
41 | JNIEXPORT jint JNICALL Java_com_pi4j_wiringpi_SoftTone_softToneCreate
42 | (JNIEnv *, jclass, jint);
43 |
44 | /*
45 | * Class: com_pi4j_wiringpi_SoftTone
46 | * Method: softToneWrite
47 | * Signature: (II)V
48 | */
49 | JNIEXPORT void JNICALL Java_com_pi4j_wiringpi_SoftTone_softToneWrite
50 | (JNIEnv *, jclass, jint, jint);
51 |
52 | /*
53 | * Class: com_pi4j_wiringpi_SoftTone
54 | * Method: softToneStop
55 | * Signature: (I)V
56 | */
57 | JNIEXPORT void JNICALL Java_com_pi4j_wiringpi_SoftTone_softToneStop
58 | (JNIEnv *, jclass, jint);
59 |
60 | #ifdef __cplusplus
61 | }
62 | #endif
63 | #endif
64 |
--------------------------------------------------------------------------------
/src/license/template.ftl:
--------------------------------------------------------------------------------
1 | **********************************************************************
2 | ORGANIZATION : ${organizationName}
3 | PROJECT : ${projectName}
4 | FILENAME : ${file.name}
5 |
6 | This file is part of the Pi4J project. More information about
7 | this project can be found here: https://pi4j.com/
8 | **********************************************************************
9 |
--------------------------------------------------------------------------------
/src/site/apt/contact.apt:
--------------------------------------------------------------------------------
1 | ------
2 | Contact
3 | ------
4 |
5 | Contact / Communication
6 |
7 | You can use the following methods to contact the Pi4J project or get additional community support/information:
8 |
9 | %{toc|section=0|fromDepth=2|toDepth=3}
10 |
11 |
12 | * Pi4J Community Forum
13 |
14 | Project communication is conducted on this discussion forum:\
15 | {{https://forum.pi4j.com}}
16 |
17 | * @Pi4J on Twitter
18 |
19 | Project announcements are communicated on the Pi4J Twitter account:\
20 | {{https://twitter.com/pi4j}}
21 |
22 | * Pi4J Issue Tracking
23 |
24 | Project bugs and feature request are tracked here:\
25 | {{https://github.com/Pi4J/pi4j/issues}}
26 |
27 | * Savage Home Automation Blog
28 |
29 | Blog articles on the Pi4J project can be found here:\
30 | {{{http://www.savagehomeautomation.com/projects/category/pi4j}http://www.savagehomeautomation.com}}
31 |
32 | * Raspberry Pi Community Forum
33 |
34 | There is an active Java community using Pi4J on the Raspberry Pi forums. You may be able to get answers to questions or assistance much quicker on these forums\
35 | {{{http://www.raspberrypi.org/phpBB3/viewforum.php?f=81&sid=7cd482af16178d206316edf96b022166}Raspberry Pi | Programming | Java Forum}}
36 |
--------------------------------------------------------------------------------
/src/site/apt/dependency.apt:
--------------------------------------------------------------------------------
1 | ------
2 | Dependencies
3 | ------
4 |
5 | Dependencies
6 |
7 | Pi4J implements a JNI wrapper of the WiringPi library (originally) developed by Gordon Henderson.\
8 | Pi4J dynamically compiles against the WiringPi library so you must have Wiring Pi installed on your target
9 | system. WiringPi is included by default in the latest Raspbian builds; however, it may not be the latest version.
10 |
11 | More information on the WiringPi project can be found here:\
12 | {{http://wiringpi.com/}}
13 |
14 | <>: The original WiringPi library has been **{{{http://wiringpi.com/wiringpi-deprecated/}DEPRECATED}}** and
15 | is no longer maintained.\
16 | To support RaspberryPi 4B/400/CM4 and newer systems you must install the latest *unofficial*
17 | WiringPi version which is maintained here: {{https://github.com/WiringPi/WiringPi}}.
18 |
19 | If you have Pi4J installed on your RaspberryPi, you can use the following script command to download, build and
20 | install the latest build of WiringPi.
21 |
22 | ----------------------------------------
23 | sudo pi4j --wiringpi
24 | ----------------------------------------
25 |
26 | Alternatively, you can use the following shell commands to download, build and install the latest
27 | build of WiringPi.
28 |
29 | ----------------------------------------
30 | sudo apt-get remove wiringpi -y
31 | sudo apt-get --yes install git-core gcc make
32 | cd ~
33 | git clone https://github.com/WiringPi/WiringPi --branch master --single-branch wiringpi
34 | cd ~/wiringpi
35 | sudo ./build
36 | ----------------------------------------
37 |
38 | [./images/pi4j-dependencies-small.png]
39 |
40 | {{{./images/pi4j-dependencies.png}(click here for hi-resolution image)}}
41 |
42 | =====================
43 |
44 | Additional compile-time dependency information can be found here: {{{./dependency-info.html}Dependency Information Report}}
45 |
--------------------------------------------------------------------------------
/src/site/apt/download.apt:
--------------------------------------------------------------------------------
1 | ------
2 | Download
3 | ------
4 |
5 | Download
6 |
7 | You can use any of the following methods to download the Pi4J library.
8 |
9 | %{toc|section=0|fromDepth=2|toDepth=3}
10 |
11 | * Direct Download
12 |
13 | You can download the compiled Pi4J library JARs directly here:
14 |
15 | <>
16 |
17 | * {{{https://pi4j.com/download/pi4j-1.4.deb}pi4j-1.4.deb}} <<>>
18 |
19 | * {{{https://pi4j.com/download/pi4j-1.4.zip}pi4j-1.4.zip}} <<>>
20 |
21 | * Maven Repository
22 |
23 | <>
24 |
25 | Pi4J release builds will be deployed to Maven Central when each final version build is released.
26 |
27 | The following dependency is all that is required to include Pi4J (core library) in your Maven project.
28 |
29 | +---------------------
30 |
31 | com.pi4j
32 | pi4j-core
33 | 1.4
34 |
35 | +---------------------
36 |
37 |
38 | <>
39 |
40 | Snapshots will be hosted in the following Sonatype OSS repository.\
41 | {{https://oss.sonatype.org/index.html#nexus-search;gav~com.pi4j~pi4j-*}}
42 |
43 | To download SNAPSHOT builds in your Maven project, you must include the following repository definition in your POM.XML file.
44 |
45 | %{snippet|id=maven-repository-snippet|file=pi4j-example/pom.xml}
46 |
47 | The following dependency is all that is needed to include Pi4J (core library) in your Maven project.
48 |
49 | +---------------------
50 |
51 | com.pi4j
52 | pi4j-core
53 | 2.0-SNAPSHOT
54 |
55 | +---------------------
56 |
57 |
58 | * Source Repository
59 |
60 | This project is provided as open source software and is hosted at GitHub:\
61 | {{https://github.com/Pi4J/pi4j}}
62 |
63 |
--------------------------------------------------------------------------------
/src/site/apt/example/more.apt.vm:
--------------------------------------------------------------------------------
1 | ------
2 | More Pi4J Examples
3 | ------
4 |
5 | More Pi4J Examples
6 |
7 | The Pi4J project includes many more comprehensive examples included both when installed locally and available in
8 | the Pi4J Exmaples project at GitHub.
9 |
10 |
11 | * Examples on GitHub
12 |
13 | The Pi4J Examples project can be found on GitHub at this location:
14 | {{https://github.com/Pi4J/pi4j/tree/master/pi4j-example/src/main/java}}
15 |
16 |
17 | * Locally Installed Examples
18 |
19 | When Pi4J is installed using the Debian package installer, Pi4J will also include all examples in the
20 | "/opt/pi4j/examples" path on your local file system.
21 |
22 | If you have not already downloaded and installed the Pi4J library on the RaspberryPi, then view this page for instructions on where to download and how to install Pi4J: \
23 | {{{../install.html}Download & Install Pi4J}}
24 |
25 | * Compile
26 |
27 | Next, use the following command to compile any of the example programs:
28 |
29 | <<>>
30 |
31 | or
32 |
33 | <<>>
34 |
35 | * Execute
36 |
37 | The following command will run the compiled example program:
38 |
39 | <<>>
40 |
41 | or
42 |
43 | <<>>
44 |
--------------------------------------------------------------------------------
/src/site/apt/pins/rpi-1ap.apt:
--------------------------------------------------------------------------------
1 | ------
2 | Pin Numbering - Raspberry Pi Model A+
3 | ------
4 |
5 | Pin Numbering - Raspberry Pi Model A+
6 |
7 | %{toc|section=0|fromDepth=2|toDepth=3}
8 |
9 | * Numbering Scheme
10 |
11 | Pi4J (by default) uses an abstract pin numbering scheme to help insulate software from hardware changes.\
12 | Pi4J implements the same pin number scheme as the Wiring Pi project.
13 | More information about the WiringPi pin number scheme can be found here: {{http://wiringpi.com/pins/}}
14 |
15 | Pi4J provides a {{{../apidocs/index.html?com/pi4j/io/gpio/RaspiPin.html}RaspiPin}} enumeration that is used to manage the accessible GPIO pins.
16 |
17 | (NOTE: Pi4J also can be configured to use the Broadcom Pin numbering scheme.)
18 |
19 | Please see this page for more information on both the WiringPi and Broadcom pin numbering schemes: \
20 | >> {{{../pin-numbering-scheme.html}Pin Numbering Schemes}}
21 |
22 |
23 | * Expansion Header
24 |
25 | The Raspberry Pi Model A+ board contains a single 40-pin expansion header labeled as 'J8' providing access to 28 GPIO pins.\
26 | (Pins 1, 2, 39 & 40 are also labeled below.)
27 |
28 | [../images/pi4j-rpi-1ap-header.png]
29 |
30 | * GPIO Pinout (40-pin J8 Header)
31 |
32 | The diagram below illustrates the GPIO pinout using the Pi4J/WiringPi GPIO numbering scheme.
33 |
34 | [../images/pi4j-rpi-1ap-pinout-small.png]
35 |
36 | {{{../images/pi4j-rpi-1ap-pinout.png}(click here for hi-resolution image)}}
37 |
38 |
39 | * Additional Resources
40 |
41 | * Please visit the {{{../usage.html}usage}} page for additional details on how to control these pins using Pi4J.
42 |
43 | * {{{https://www.raspberrypi.org/products/raspberry-pi-1-model-a-plus/}Click here for more information on the Raspberry Pi 1A Plus.}}
44 |
45 | * {{{http://elinux.org/RPi_BCM2835_GPIOs}Click here for more information the Raspberry Pi pin functions.}}
46 |
--------------------------------------------------------------------------------
/src/site/apt/pins/rpi-1b-rev1.apt:
--------------------------------------------------------------------------------
1 | ------
2 | Pin Numbering - Raspberry Pi Model B (Revision 1.0)
3 | ------
4 |
5 | Pin Numbering - Raspberry Pi Model B (Revision 1.0)
6 |
7 | %{toc|section=0|fromDepth=2|toDepth=3}
8 |
9 | * Numbering Scheme
10 |
11 | Pi4J (by default) uses an abstract pin numbering scheme to help insulate software from hardware changes.\
12 | Pi4J implements the same pin number scheme as the Wiring Pi project.
13 | More information about the WiringPi pin number scheme can be found here: {{http://wiringpi.com/pins/}}
14 |
15 | Pi4J provides a {{{../apidocs/index.html?com/pi4j/io/gpio/RaspiPin.html}RaspiPin}} enumeration that is used to manage the accessible GPIO pins.
16 |
17 | (NOTE: Pi4J also can be configured to use the Broadcom Pin numbering scheme.)
18 |
19 | Please see this page for more information on both the WiringPi and Broadcom pin numbering schemes: \
20 | >> {{{../pin-numbering-scheme.html}Pin Numbering Schemes}}
21 |
22 |
23 | * Expansion Header
24 |
25 | The Raspberry Pi Model B board revision 1.0 contains a single 26-pin expansion header labeled as 'P1' providing access to 17 GPIO pins.
26 |
27 | [../images/pi4j-rpi-1b-rev1-header.png]
28 |
29 | * P1 Pinout (26-pin Header)
30 |
31 | The diagram below illustrates the GPIO pinout using the Pi4J/WiringPi GPIO numbering scheme.
32 |
33 | [../images/pi4j-rpi-1b-pinout-small.png]
34 |
35 | {{{../images/pi4j-rpi-1b-pinout.png}(click here for hi-resolution image)}}
36 |
37 |
38 | * Additional Resources
39 |
40 | * Please visit the {{{../usage.html}usage}} page for additional details on how to control these pins using Pi4J.
41 |
42 | * {{{http://elinux.org/RPi_Low-level_peripherals#General_Purpose_Input.2FOutput_.28GPIO.29}Click here for more information on the P1 header.}}
43 |
44 | * {{{http://elinux.org/RPi_BCM2835_GPIOs}Click here for more information the Raspberry Pi pin functions.}}
45 |
--------------------------------------------------------------------------------
/src/site/apt/pins/rpi-1bp.apt:
--------------------------------------------------------------------------------
1 | ------
2 | Pin Numbering - Raspberry Pi Model B+
3 | ------
4 |
5 | Pin Numbering - Raspberry Pi Model B+
6 |
7 | %{toc|section=0|fromDepth=2|toDepth=3}
8 |
9 | * Numbering Scheme
10 |
11 | Pi4J (by default) uses an abstract pin numbering scheme to help insulate software from hardware changes.\
12 | Pi4J implements the same pin number scheme as the Wiring Pi project.
13 | More information about the WiringPi pin number scheme can be found here: {{http://wiringpi.com/pins/}}
14 |
15 | Pi4J provides a {{{../apidocs/index.html?com/pi4j/io/gpio/RaspiPin.html}RaspiPin}} enumeration that is used to manage the accessible GPIO pins.
16 |
17 | (NOTE: Pi4J also can be configured to use the Broadcom Pin numbering scheme.)
18 |
19 | Please see this page for more information on both the WiringPi and Broadcom pin numbering schemes: \
20 | >> {{{../pin-numbering-scheme.html}Pin Numbering Schemes}}
21 |
22 |
23 | * Expansion Header
24 |
25 | The Raspberry Pi Model B+ board contains a single 40-pin expansion header labeled as 'J8' providing access to 28 GPIO pins.\
26 | (Pins 1, 2, 39 & 40 are also labeled below.)
27 |
28 | [../images/pi4j-rpi-1bp-header.png]
29 |
30 | * GPIO Pinout (40-pin J8 Header)
31 |
32 | The diagram below illustrates the GPIO pinout using the Pi4J/WiringPi GPIO numbering scheme.
33 |
34 | [../images/pi4j-rpi-1bp-pinout-small.png]
35 |
36 | {{{../images/pi4j-rpi-1bp-pinout.png}(click here for hi-resolution image)}}
37 |
38 |
39 | * Additional Resources
40 |
41 | * Please visit the {{{../usage.html}usage}} page for additional details on how to control these pins using Pi4J.
42 |
43 | * {{{https://www.raspberrypi.org/products/raspberry-pi-1-model-b-plus/}Click here for more information on the Raspberry Pi 1B Plus.}}
44 |
45 | * {{{http://elinux.org/RPi_BCM2835_GPIOs}Click here for more information the Raspberry Pi pin functions.}}
46 |
--------------------------------------------------------------------------------
/src/site/apt/pins/rpi-2b.apt:
--------------------------------------------------------------------------------
1 | ------
2 | Pin Numbering - Raspberry Pi 2 Model B
3 | ------
4 |
5 | Pin Numbering - Raspberry Pi 2 Model B
6 |
7 | %{toc|section=0|fromDepth=2|toDepth=3}
8 |
9 | * Numbering Scheme
10 |
11 | Pi4J (by default) uses an abstract pin numbering scheme to help insulate software from hardware changes.\
12 | Pi4J implements the same pin number scheme as the Wiring Pi project.
13 | More information about the WiringPi pin number scheme can be found here: {{http://wiringpi.com/pins/}}
14 |
15 | Pi4J provides a {{{../apidocs/index.html?com/pi4j/io/gpio/RaspiPin.html}RaspiPin}} enumeration that is used to manage the accessible GPIO pins.
16 |
17 | (NOTE: Pi4J also can be configured to use the Broadcom Pin numbering scheme.)
18 |
19 | Please see this page for more information on both the WiringPi and Broadcom pin numbering schemes: \
20 | >> {{{../pin-numbering-scheme.html}Pin Numbering Schemes}}
21 |
22 |
23 | * Expansion Header
24 |
25 | The Raspberry Pi 2 Model B board contains a single 40-pin expansion header labeled as 'J8' providing access to 28 GPIO pins.\
26 | (Pins 1, 2, 39 & 40 are also labeled below.)
27 |
28 | [../images/pi4j-rpi-2b-header.png]
29 |
30 | * GPIO Pinout (40-pin J8 Header)
31 |
32 | The diagram below illustrates the GPIO pinout using the Pi4J/WiringPi GPIO numbering scheme.
33 |
34 | [../images/pi4j-rpi-2b-pinout-small.png]
35 |
36 | {{{../images/pi4j-rpi-2b-pinout.png}(click here for hi-resolution image)}}
37 |
38 |
39 | * Additional Resources
40 |
41 | * Please visit the {{{../usage.html}usage}} page for additional details on how to control these pins using Pi4J.
42 |
43 | * {{{https://www.raspberrypi.org/products/raspberry-pi-2-model-b/}Click here for more information on the Raspberry Pi 2B.}}
44 |
45 | * {{{http://elinux.org/RPi_BCM2835_GPIOs}Click here for more information the Raspberry Pi pin functions.}}
46 |
--------------------------------------------------------------------------------
/src/site/apt/pins/rpi-zero.apt:
--------------------------------------------------------------------------------
1 | ------
2 | Pin Numbering - Raspberry Pi Zero
3 | ------
4 |
5 | Pin Numbering - Raspberry Pi Zero
6 |
7 | %{toc|section=0|fromDepth=2|toDepth=3}
8 |
9 | * Numbering Scheme
10 |
11 | Pi4J uses an abstract pin numbering scheme to help insulate software from hardware changes.\
12 | Pi4J implements the same pin number scheme as the Wiring Pi project.
13 | More information about the WiringPi pin number scheme can be found here: {{http://wiringpi.com/pins/}}
14 |
15 | Pi4J provides a {{{../apidocs/index.html?com/pi4j/io/gpio/RaspiPin.html}RaspiPin}} enumeration that is used to manage the accessible GPIO pins.
16 |
17 |
18 | * Expansion Header
19 |
20 | The Raspberry Pi Zero board contains a single 40-pin expansion header labeled as 'J8' providing access to 28 GPIO pins.\
21 | (Pins 1, 2, 39 & 40 are also labeled below.)
22 |
23 | [../images/pi4j-rpi-zero-header-small.png]
24 |
25 | {{{../images/pi4j-rpi-zero-header.png}(click here for hi-resolution image)}}
26 |
27 | * GPIO Pinout (40-pin J8 Header)
28 |
29 | The diagram below illustrates the GPIO pinout using the Pi4J/WiringPi GPIO numbering scheme.
30 |
31 | [../images/pi4j-rpi-zero-pinout-small.png]
32 |
33 | {{{../images/pi4j-rpi-zero-pinout.png}(click here for hi-resolution image)}}
34 |
35 |
36 | * Additional Resources
37 |
38 | * Please visit the {{{../usage.html}usage}} page for additional details on how to control these pins using Pi4J.
39 |
40 | * {{{https://www.raspberrypi.org/products/raspberry-pi-zero/}Click here for more information on the Raspberry Pi Zero.}}
41 |
42 | * {{{http://elinux.org/RPi_BCM2835_GPIOs}Click here for more information the Raspberry Pi pin functions.}}
43 |
--------------------------------------------------------------------------------
/src/site/apt/pins/rpi-zerow.apt:
--------------------------------------------------------------------------------
1 | ------
2 | Pin Numbering - Raspberry Pi Zero W
3 | ------
4 |
5 | Pin Numbering - Raspberry Pi Zero W
6 |
7 | %{toc|section=0|fromDepth=2|toDepth=3}
8 |
9 | * Numbering Scheme
10 |
11 | Pi4J uses an abstract pin numbering scheme to help insulate software from hardware changes.\
12 | Pi4J implements the same pin number scheme as the Wiring Pi project.
13 | More information about the WiringPi pin number scheme can be found here: {{http://wiringpi.com/pins/}}
14 |
15 | Pi4J provides a {{{../apidocs/index.html?com/pi4j/io/gpio/RaspiPin.html}RaspiPin}} enumeration that is used to manage the accessible GPIO pins.
16 |
17 |
18 | * Expansion Header
19 |
20 | The Raspberry Pi Zero W board contains a single 40-pin expansion header labeled as 'J8' providing access to 28 GPIO pins.\
21 | (Pins 1, 2, 39 & 40 are also labeled below.)
22 |
23 | [../images/pi4j-rpi-zerow-header-small.png]
24 |
25 | {{{../images/pi4j-rpi-zerow-header.png}(click here for hi-resolution image)}}
26 |
27 | * GPIO Pinout (40-pin J8 Header)
28 |
29 | The diagram below illustrates the GPIO pinout using the Pi4J/WiringPi GPIO numbering scheme.
30 |
31 | [../images/pi4j-rpi-zerow-pinout-small.png]
32 |
33 | {{{../images/pi4j-rpi-zerow-pinout.png}(click here for hi-resolution image)}}
34 |
35 |
36 | * Additional Resources
37 |
38 | * Please visit the {{{../usage.html}usage}} page for additional details on how to control these pins using Pi4J.
39 |
40 | * {{{https://www.raspberrypi.org/products/raspberry-pi-zero-w/}Click here for more information on the Raspberry Pi Zero W.}}
41 |
42 | * {{{http://elinux.org/RPi_BCM2835_GPIOs}Click here for more information the Raspberry Pi pin functions.}}
43 |
--------------------------------------------------------------------------------
/src/site/apt/release-notes.apt:
--------------------------------------------------------------------------------
1 | ------
2 | Release Notes
3 | ------
4 |
5 | Release Notes
6 |
7 | The following excerpt is from the README file included in the project.
8 |
9 | %{snippet|file=README.md}
10 |
11 |
--------------------------------------------------------------------------------
/src/site/resources/CNAME:
--------------------------------------------------------------------------------
1 | pi4j.com
--------------------------------------------------------------------------------
/src/site/resources/android-chrome-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/android-chrome-144x144.png
--------------------------------------------------------------------------------
/src/site/resources/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/android-chrome-192x192.png
--------------------------------------------------------------------------------
/src/site/resources/android-chrome-36x36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/android-chrome-36x36.png
--------------------------------------------------------------------------------
/src/site/resources/android-chrome-48x48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/android-chrome-48x48.png
--------------------------------------------------------------------------------
/src/site/resources/android-chrome-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/android-chrome-72x72.png
--------------------------------------------------------------------------------
/src/site/resources/android-chrome-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/android-chrome-96x96.png
--------------------------------------------------------------------------------
/src/site/resources/apple-touch-icon-114x114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/apple-touch-icon-114x114.png
--------------------------------------------------------------------------------
/src/site/resources/apple-touch-icon-120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/apple-touch-icon-120x120.png
--------------------------------------------------------------------------------
/src/site/resources/apple-touch-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/apple-touch-icon-144x144.png
--------------------------------------------------------------------------------
/src/site/resources/apple-touch-icon-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/apple-touch-icon-152x152.png
--------------------------------------------------------------------------------
/src/site/resources/apple-touch-icon-180x180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/apple-touch-icon-180x180.png
--------------------------------------------------------------------------------
/src/site/resources/apple-touch-icon-57x57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/apple-touch-icon-57x57.png
--------------------------------------------------------------------------------
/src/site/resources/apple-touch-icon-60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/apple-touch-icon-60x60.png
--------------------------------------------------------------------------------
/src/site/resources/apple-touch-icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/apple-touch-icon-72x72.png
--------------------------------------------------------------------------------
/src/site/resources/apple-touch-icon-76x76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/apple-touch-icon-76x76.png
--------------------------------------------------------------------------------
/src/site/resources/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/apple-touch-icon-precomposed.png
--------------------------------------------------------------------------------
/src/site/resources/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/apple-touch-icon.png
--------------------------------------------------------------------------------
/src/site/resources/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | #da532c
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/site/resources/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/favicon-16x16.png
--------------------------------------------------------------------------------
/src/site/resources/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/favicon-32x32.png
--------------------------------------------------------------------------------
/src/site/resources/favicon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/favicon-96x96.png
--------------------------------------------------------------------------------
/src/site/resources/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/favicon.ico
--------------------------------------------------------------------------------
/src/site/resources/images/gpio-control-example-large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/gpio-control-example-large.png
--------------------------------------------------------------------------------
/src/site/resources/images/gpio-control-example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/gpio-control-example.png
--------------------------------------------------------------------------------
/src/site/resources/images/gpio-listener-example-large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/gpio-listener-example-large.png
--------------------------------------------------------------------------------
/src/site/resources/images/gpio-listener-example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/gpio-listener-example.png
--------------------------------------------------------------------------------
/src/site/resources/images/gpio-trigger-example-large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/gpio-trigger-example-large.png
--------------------------------------------------------------------------------
/src/site/resources/images/gpio-trigger-example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/gpio-trigger-example.png
--------------------------------------------------------------------------------
/src/site/resources/images/logos/pi4j-header-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/logos/pi4j-header-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/logos/pi4j-header-small2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/logos/pi4j-header-small2.png
--------------------------------------------------------------------------------
/src/site/resources/images/logos/pi4j-header-small3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/logos/pi4j-header-small3.png
--------------------------------------------------------------------------------
/src/site/resources/images/logos/pi4j-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/logos/pi4j-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/logos/pi4j-header2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/logos/pi4j-header2.png
--------------------------------------------------------------------------------
/src/site/resources/images/logos/pi4j-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/logos/pi4j-logo.png
--------------------------------------------------------------------------------
/src/site/resources/images/logos/pi4j.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/logos/pi4j.png
--------------------------------------------------------------------------------
/src/site/resources/images/logos/raspberrypi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/logos/raspberrypi.png
--------------------------------------------------------------------------------
/src/site/resources/images/logos/trademarks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/logos/trademarks.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-dependencies-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-dependencies-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-dependencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-dependencies.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1a-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1a-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1a-p5-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1a-p5-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1a-p5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1a-p5.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1a-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1a-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1a-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1a-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1ap-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1ap-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1ap-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1ap-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1ap-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1ap-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1b-p5-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1b-p5-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1b-p5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1b-p5.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1b-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1b-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1b-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1b-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1b-rev1-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1b-rev1-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1b-rev2-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1b-rev2-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1bp-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1bp-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1bp-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1bp-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-1bp-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-1bp-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-2b-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-2b-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-2b-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-2b-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-2b-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-2b-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-3ap-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-3ap-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-3ap-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-3ap-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-3ap-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-3ap-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-3b-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-3b-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-3b-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-3b-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-3b-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-3b-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-3bp-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-3bp-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-3bp-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-3bp-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-3bp-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-3bp-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-400-header-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-400-header-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-400-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-400-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-400-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-400-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-400-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-400-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-4b-header-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-4b-header-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-4b-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-4b-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-4b-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-4b-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-4b-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-4b-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm1-header-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm1-header-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm1-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm1-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm1-pinout-j5-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm1-pinout-j5-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm1-pinout-j5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm1-pinout-j5.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm1-pinout-j6-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm1-pinout-j6-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm1-pinout-j6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm1-pinout-j6.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm3-header-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm3-header-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm3-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm3-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm3-pinout-j5-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm3-pinout-j5-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm3-pinout-j5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm3-pinout-j5.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm3-pinout-j6-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm3-pinout-j6-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm3-pinout-j6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm3-pinout-j6.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm3p-header-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm3p-header-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm3p-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm3p-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm3p-pinout-j5-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm3p-pinout-j5-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm3p-pinout-j5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm3p-pinout-j5.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm3p-pinout-j6-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm3p-pinout-j6-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm3p-pinout-j6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm3p-pinout-j6.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm4-header-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm4-header-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm4-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm4-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm4-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm4-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-cm4-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-cm4-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-zero-header-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-zero-header-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-zero-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-zero-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-zero-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-zero-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-zero-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-zero-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-zerow-header-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-zerow-header-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-zerow-header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-zerow-header.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-zerow-pinout-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-zerow-pinout-small.png
--------------------------------------------------------------------------------
/src/site/resources/images/pi4j-rpi-zerow-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pi4j-rpi-zerow-pinout.png
--------------------------------------------------------------------------------
/src/site/resources/images/pinoff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pinoff.png
--------------------------------------------------------------------------------
/src/site/resources/images/pinon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/pinon.png
--------------------------------------------------------------------------------
/src/site/resources/images/serial-example-large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/serial-example-large.png
--------------------------------------------------------------------------------
/src/site/resources/images/serial-example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/serial-example.png
--------------------------------------------------------------------------------
/src/site/resources/images/serial-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/serial-screenshot.png
--------------------------------------------------------------------------------
/src/site/resources/images/system-info-example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/system-info-example.png
--------------------------------------------------------------------------------
/src/site/resources/images/under-construction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/images/under-construction.png
--------------------------------------------------------------------------------
/src/site/resources/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pi4j",
3 | "icons": [
4 | {
5 | "src": "\/android-chrome-36x36.png",
6 | "sizes": "36x36",
7 | "type": "image\/png",
8 | "density": 0.75
9 | },
10 | {
11 | "src": "\/android-chrome-48x48.png",
12 | "sizes": "48x48",
13 | "type": "image\/png",
14 | "density": 1
15 | },
16 | {
17 | "src": "\/android-chrome-72x72.png",
18 | "sizes": "72x72",
19 | "type": "image\/png",
20 | "density": 1.5
21 | },
22 | {
23 | "src": "\/android-chrome-96x96.png",
24 | "sizes": "96x96",
25 | "type": "image\/png",
26 | "density": 2
27 | },
28 | {
29 | "src": "\/android-chrome-144x144.png",
30 | "sizes": "144x144",
31 | "type": "image\/png",
32 | "density": 3
33 | },
34 | {
35 | "src": "\/android-chrome-192x192.png",
36 | "sizes": "192x192",
37 | "type": "image\/png",
38 | "density": 4
39 | }
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/src/site/resources/mstile-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/mstile-144x144.png
--------------------------------------------------------------------------------
/src/site/resources/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/mstile-150x150.png
--------------------------------------------------------------------------------
/src/site/resources/mstile-310x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/mstile-310x150.png
--------------------------------------------------------------------------------
/src/site/resources/mstile-310x310.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/mstile-310x310.png
--------------------------------------------------------------------------------
/src/site/resources/mstile-70x70.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Pi4J/pi4j-v1/952f283604e9287a2f7b5dfac5ac5a5b93324409/src/site/resources/mstile-70x70.png
--------------------------------------------------------------------------------
/src/site/resources/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
36 |
--------------------------------------------------------------------------------
/src/site/root/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | The Pi4J Project – Home
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
24 | The Pi4J Project
25 |
26 |
36 |
37 |
38 |
The Pi4J Project
39 |
40 |
If you are not automatically redirected, please use the following link: The Pi4J Project