Skip to content

Commit

Permalink
Merge pull request #47 from Pi4J/release/2.5.0
Browse files Browse the repository at this point in the history
2.5.0 Release Notes
  • Loading branch information
FDelporte authored Mar 18, 2024
2 parents 8316389 + a51ced2 commit 61081a4
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 9 deletions.
4 changes: 2 additions & 2 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ title: Welcome to Pi4J

## Welcome to Pi4J

**Latest release: V2.4.0 (2023-10-24, see [Release Notes](/about/release-notes/)).**
**Latest release: V2.5.0 (2024-03-??, see [Release Notes](/about/release-notes/)).**

This project is intended to provide **a friendly object-oriented I/O API and implementation libraries for Java Programmers** to access the **full I/O capabilities of the Raspberry Pi platform**. This project abstracts the low-level native integration and interrupt monitoring to enable Java programmers to **focus on implementing their application business logic**.

{{% notice warning %}}
Pi4J is not compatible yet with the new Raspberry Pi 5, because of the new [GPIO chip RP1](https://www.raspberrypi.com/documentation/microcontrollers/rp1.html). See for more info, [ticket #321](https://github.com/Pi4J/pi4j-v2/issues/321).
Pi4J supports the new Raspberry Pi 5 as of version 2.5.0. Because of the new [GPIO chip RP1](https://www.raspberrypi.com/documentation/microcontrollers/rp1.html), a new GPIO Provider was needed. See the [release notes for more info](/about/release-notes/).
{{% /notice %}}

If you immediately want to "dive" into Pi4J development, check these resources:
Expand Down
28 changes: 28 additions & 0 deletions content/about/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,34 @@ weight: 40

All releases of Pi4J V.2 are listed on [github.com/Pi4J/pi4j-v2/releases](https://github.com/Pi4J/pi4j-v2/releases).

## 2024-03-?? - V2.5.0

With over 100 commits from multiple branches, this is a major release with many improvements! With many thanks to the core team ([Robert von Burg](https://github.com/eitch), [Tom Aarts](https://github.com/taartspi)), and a major addition of [Alexander Liggesmeyer](https://github.com/alex9849), Pi4J is again lifted to a higher level!

### Changes in 2.5.0

* A new GpioD Provider adds **support for the Raspberry Pi 5**.
* Issues [#321](https://github.com/Pi4J/pi4j-v2/issues/321), [#320](https://github.com/Pi4J/pi4j-v2/issues/320), [#317](https://github.com/Pi4J/pi4j-v2/issues/317)
* This new GpioD provider interfaces directly with the Raspberry Pi's gpiochip device, located at `/dev/gpiochip...`. It leverages the [native libgpiod library](https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/?h=v1.6.x), which is developed as a part of the Linux kernel. Libgpiod is currently the recommended way to control GPIO pins. Therefore, using this provider is also recommended.
* This new provider can be used without the need to start a Pi4J application with sudo, so also fixes [#212](https://github.com/Pi4J/pi4j-v2/issues/212) when you only need DigitalInput and/or DigitalOutput.
* Better handling of mock Plugins: Plugins can now define if they are mocks, and these are not auto-detected anymore. The default target for the Pi4J library is the Raspberry Pi, and thus auto-detecting mocks on the Pi, which are only for tests is counterintuitive.
* Extended Providers with a priority: this priority helps to determine which Provider should be loaded, when multiple Providers with the same IOType are being loaded by different plugins. This change enforces that a given IOType can only have one Provider loaded at runtime preventing errors when, for instance, two I2C providers are loaded at the same time, concurrently writing to the I2C bus.
* Fix for: LinuxFile reused scratch buffers ensuring size was usable. But the limit value cannot be modified so later usage failed as an intended overwrite. Pull request [#331](https://github.com/Pi4J/pi4j-v2/pull/331).
* Fix for: I2C interface should use a restart between the write and read operation. Pull request [#333](https://github.com/Pi4J/pi4j-v2/pull/333).
* Fix for: LinuxFile reused scratch buffers ensuring size was usable, but the limit value cannot be modified so later usage failed as an intended overwrite. Commit [ed208f2](https://github.com/Pi4J/pi4j-v2/commit/ed208f26cfd2a92978d010495fa1c6b5f8726e12).
* Fix for: Shutting down pool executor too early. Commit [7909a2d](https://github.com/Pi4J/pi4j-v2/commit/7909a2d64d07d23732e5e31254d4d32d4c4087bd).
* ProviderProxyHandler got removed, simplifying provider loading, thus no more reflection on the instances.
* You can now add and remove IO instances at runtime.
* You can now easily switch a GPIO from output to an input and vice versa, see issue [#26](https://github.com/Pi4J/pi4j-v2/issues/26), extending on the work by [@MEBoo](https://github.com/MEBoo), in pull request [#1](https://github.com/MEBoo/pi4j-v2-issue26/pull/1).
* A race condition got fixed in the default runtime registry.
* Proper life cycle management got added for of all threads in Pi4J.

All changes: https://github.com/Pi4J/pi4j-v2/compare/2.4.0...2.5.0

### Known Issue

* _java.io.IOException: Remote I/O error java.base/java.io.RandomAccessFile.writeBytes(Native Method). Using linuxfs-i2c, dependent upon i2c operations this exception can occur_: If the program initially uses read or write, and later uses readRegister or writeRegister there is no exception. However if the program initially uses readRegister or writeRegister subsequent write or read may encounter this exception. For more info and the temporary fix, check [#335](https://github.com/Pi4J/pi4j-v2/issues/335).

## 2023-10-24 - V2.4.0

* Extended LinuxFS plugin
Expand Down
1 change: 1 addition & 0 deletions content/about/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ weight: 60
| ![](/assets/about/team/eitch.jpg) | **[Robert von Burg aka "Eitch"](https://mstdn.gsi.li/@eitch), Developer, Releaser**.<br><br>As lead developer for [strolch.li](https://strolch.li) we use Raspberry Pi as our platform to connect with products, and to implement a PLC in Java. The Pi4J project allows us to encapsulate the low level aspects of communicating with the hardware, and stay in our preferred choice. The [strolch.li/plc.html](https://strolch.li/plc.html) project allows us to also stay in the same DSL for writing server applications, as well as communicating with low level devices. Since I love open source projects, it felt natural to me to start investing time in the Pi4J projects to assist in the further development. |
| ![](/assets/about/team/tom.jpg) | **Thomas Aarts (aka Tom), Developer, Creating IC examples**.<br><br>My previous work entailed a decade in Alaska involving HF through Microwave communication and airport Instrument Landing Systems (ILS) DME NDB VASI. The next decade was centered around telephony. Working for ‘ROLM’ I was a software engineer working on the CBX series of switches. Most years in assembler using the DG instruction set. Later years on the larger CBX that used a company designed compiler much like ‘C’ on a much different instruction set. The last two decades I worked within an IBM lab. At the start I worked the AS400, a mid to large size server. Initially development of software at the user interface, above the MI. After a few years I moved in the firmware stack at the time all the servers, mid-mainframe, changed to using the IBM RISC processor. After some years in the firmware stack I moved to a newly formed simulation team. This entailed developing a simulation of the entire central processor complex (CPC) or Central Electronic Complex (CEC) to enable the firmware stack to boot and the partitions to boot on top and run. So after a long time working just above the hardware or simulating the hardware I found the Pi4j project of interest. After its’ use for some sensors and displays I am spending more time learning its capability and if possible offer something to the project. After that by decade history rundown I should add I retired. |
| ![](/assets/about/team/muhammad.jpg) | **[Muhammad Hashim aka "mhashim6"](https://twitter.com/UpsideDownTrees), Developer, Focus on Kotlin**.<br><br>I'm a Software Engineer at [Instabug](https://www.instabug.com/), Writer & Blogger at [The Upside-Down Trees](https://blog.mhashim6.me) & [The Unhappy Folk](https://blog.unhappyfolk.org). I go by *"Timeless, Placeless"* As it better reflects the crafts I do; my art and interests; and my life. I've joined the team to bring Kotlin to Pi4J; The project that brought the JVM to the Raspberry Pi. |
| ![](/assets/about/team/alexander.jpg) | **[Alexander Liggesmeyer](https://www.linkedin.com/in/alexander-liggesmeyer/), Student Worker at Max Planck Institute for Informatics, [personal website](https://alexander.liggesmeyer.net/)**.<br><br>Alexander created the GpioD Provider for release 2.5.0 to make Pi4J compatible with the Raspberry Pi 5. He also loves drinking cocktails with the [CocktailPi](https://pi4j.com/featured-projects/cocktail-maker-by-alex9849/) as a result. |
18 changes: 13 additions & 5 deletions content/documentation/providers/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,26 @@ on which they are used.

Current supported providers:

* [PiGpio](/documentation/providers/pigpio/)
* [GpioD]()
* Was introduced in Pi4J 2.5.0
* Pro
* Most performant at this moment, natively
* Can be used remotely
* Contra
* Needs to run as `sudo`
* Works on Raspberry Pi 5
* Doesn't need sudo
* Contra
* Only provides DigitalInput and DigitalOutput
* [LinuxFS](/documentation/providers/linuxfs/)
* Pro
* Generic for any SoC supporting LinuxFS
* Doesn't need `sudo`
* Contra
* Doesn't provide serial and SPI
* Latency (? - still to be tested)
* [PiGpio](/documentation/providers/pigpio/)
* Pro
* Provides all types of communication: DigitalInput, DigitalOutput, PWM, I2C, SPI, Serial
* Can be used remotely
* Contra
* Needs to run as `sudo`

Possible future providers:

Expand Down
34 changes: 34 additions & 0 deletions content/documentation/providers/gpiod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: GpioD Provider
weight: 91
tags: ["GpioD"]
---

The GpioD plugin provider was added in Pi4J 2.5.0 to be able to support the Raspberry Pi 5 with the new [GPIO chip RP1](https://www.raspberrypi.com/documentation/microcontrollers/rp1.html).

Providers in the GpioD plugin:

* linuxfs-i2c
* Under construction
* gpiod-digital-input
* gpiod-digital-output

To use the GpioD provider include the following dependencies:

``` xml
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-core</artifactId>
<version>${pi4j.version}</version>
</dependency>
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-plugin-raspberrypi</artifactId>
<version>${pi4j.version}</version>
</dependency>
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-plugin-gpiod</artifactId>
<version>${pi4j.version}</version>
</dependency>
```
3 changes: 2 additions & 1 deletion content/documentation/providers/linuxfs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: LinuxFS
title: LinuxFS Provider
weight: 93
tags: ["LinuxFS"]
---

Expand Down
3 changes: 2 additions & 1 deletion content/documentation/providers/pigpio.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: PiGpio
title: PiGpio Provider
weight: 95
tags: ["PiGpio"]
---

Expand Down
Binary file added static/assets/about/team/alexander.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 61081a4

Please sign in to comment.