Skip to content

DRAFT: Release notes V4 and interview Nick#85

Merged
FDelporte merged 35 commits intomainfrom
release/V4.0.0
Feb 20, 2026
Merged

DRAFT: Release notes V4 and interview Nick#85
FDelporte merged 35 commits intomainfrom
release/V4.0.0

Conversation

@FDelporte
Copy link
Member

WORK-IN-PROGRESS

@FDelporte FDelporte requested review from eitch and taartspi September 22, 2025 14:00
@FDelporte FDelporte changed the title Release notes V4 and interview Nick DRAFT: Release notes V4 and interview Nick Sep 22, 2025
Copy link
Collaborator

@taartspi taartspi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two comments. thanks for all the documentation work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DigitalSmile can you please review this version of the FFM plugin page? Is the info correct regarding the dependencies and permissions scripts?

@taartspi
Copy link
Collaborator

Looked over that latest files. Looks good

Frank Delporte and others added 5 commits January 29, 2026 19:41
# Conflicts:
#	content/documentation/io-types/i2c/_index.md
#	content/documentation/io-types/pwm.md
#	content/documentation/io-types/serial.md
#	content/documentation/io-types/spi.md
@FDelporte FDelporte marked this pull request as ready for review February 20, 2026 10:38
Copilot AI review requested due to automatic review settings February 20, 2026 10:38
@FDelporte FDelporte merged commit 77cf0a9 into main Feb 20, 2026
2 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces documentation and release notes for Pi4J V4.0.0, which bumps the minimum Java version to 25 and introduces a new FFM (Foreign Function & Memory) API plugin. The PR is marked as DRAFT and includes an interview blog post with Nick Gritsenko about the FFM implementation.

Changes:

  • Addition of V4 release notes and "What's New in V4" documentation
  • New interview blog post with Nick Gritsenko discussing the FFM API plugin
  • Updates to code examples for digital input/output, serial communication, and other IO types
  • New FFM provider documentation with setup instructions and implementation notes
  • Java version bumps from 21 to 25 across documentation
  • Addition of github-readme shortcode for embedding README content from GitHub
  • Structural improvements including new future ideas section and reorganized content

Reviewed changes

Copilot reviewed 22 out of 29 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
content/about/release-notes.md Adds comprehensive V4.0.0 release notes with highlights of 400+ commits
content/about/info-v4.md New page explaining what's new in V4, focusing on FFM plugin
content/_index.md Updates latest release to V4.0.0 and adds reference to FFM plugin
content/blog/2026/2026-interview-nick-ffm.md New interview post with Nick Gritsenko about FFM API implementation
content/documentation/providers/ffm.md New comprehensive FFM provider documentation with setup instructions
content/documentation/providers/_index.md Adds FFM to provider list with placeholder pros/cons
content/documentation/io-types/digital-input.md Updates digital input example to modern syntax
content/documentation/io-types/digital-output.md Updates digital output example to modern syntax
content/documentation/io-types/serial.md Removes deprecated serial code, adds reference to jSerialComm examples
content/getting-started/java-development-on-the-raspberry-pi-with-vsc.md Updates Java version from 21 to 25
themes/hugo-theme-learn/layouts/shortcodes/github-readme.html New shortcode for embedding GitHub README content
content/architecture/about-the-code/* Updates build instructions and download sources for Java 25
static/assets/documentation/serial/*.png New image assets for serial communication examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


The goal of this bump to V4 is to enable the use of the Foreign Function & Memory (FFM) API in Pi4J. This FFM API has been introduced in OpenJDK 22 and simplifies the use of native libraries in Java. And native libraries are "the heart" of the Pi4J project as they provide the connection between your Java code and the hardware.

Thanks to the contributions by [Nick Gritsenko (aka DigitalSmile)](https://github.com/DigitalSmile) in [pull request #458](https://github.com/Pi4J/pi4j/pull/458), a complete new plugin got added to Pi4J. Read more about the work by Nick in this [interview](/blog/2025/2025????-interview-nick-ffm/).
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blog post link appears incomplete with "2025????" in the URL. This should be replaced with the actual date to match the blog post file name "2026-interview-nick-ffm.md" (which is dated 2026-02-20).

Suggested change
Thanks to the contributions by [Nick Gritsenko (aka DigitalSmile)](https://github.com/DigitalSmile) in [pull request #458](https://github.com/Pi4J/pi4j/pull/458), a complete new plugin got added to Pi4J. Read more about the work by Nick in this [interview](/blog/2025/2025????-interview-nick-ffm/).
Thanks to the contributions by [Nick Gritsenko (aka DigitalSmile)](https://github.com/DigitalSmile) in [pull request #458](https://github.com/Pi4J/pi4j/pull/458), a complete new plugin got added to Pi4J. Read more about the work by Nick in this [interview](/blog/2026/2026-02-20-interview-nick-ffm/).

Copilot uses AI. Check for mistakes.
</dependency>
```

When using FFM API functionality added to Java in version 22, you will be alerted at startup of the applicatoin with this message:
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "applicatoin" should be "application".

Suggested change
When using FFM API functionality added to Java in version 22, you will be alerted at startup of the applicatoin with this message:
When using FFM API functionality added to Java in version 22, you will be alerted at startup of the application with this message:

Copilot uses AI. Check for mistakes.
* In the root of pi4j run `mvn clean install`
* Checkout the `develop` branch of the [pi4j repository](https://github.com/Pi4J/pi4j).
* Use a JDK version 25 or newer, e.g. `sdk use java 25.0.1-zulu`.
* In the root of the `pi4j directory, run `mvn clean install`.
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing closing backtick in the sentence. The text "In the root of the pi4j directory, run mvn clean install." should be "In the root of the pi4jdirectory, runmvn clean install`."

Suggested change
* In the root of the `pi4j directory, run `mvn clean install`.
* In the root of the `pi4j` directory, run `mvn clean install`.

Copilot uses AI. Check for mistakes.
```java
input.addListener(e -> {
if (e.state() == DigitalState.HIGH) {
if (e.state() == DigitalState.LOW){
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the digital input example, the logic appears reversed. The listener checks if (e.state() == DigitalState.LOW) and then prints "Button is pressed". However, the button is configured with PULL_DOWN resistor on line 25. With a pull-down configuration, when the button is not pressed, the pin reads LOW, and when pressed (connected to 3.3V), it reads HIGH. The condition should be if (e.state() == DigitalState.HIGH) to correctly detect when the button is pressed.

Suggested change
if (e.state() == DigitalState.LOW){
if (e.state() == DigitalState.HIGH){

Copilot uses AI. Check for mistakes.

### 2025-02-20 - V4.0.0

This is a big release with almost 400 commits and 300+ files added/changed...! **Pi4J V4 introduces the new [FFM plugin](/documentation/provider/ffm) and bumps the Java version to 25**. The FFM plugin makes use of the now Foreign Function & Memory API (FFM) to access the GPIOs. The FFM API got introduced in Java 22 with [JEP 454](https://openjdk.org/jeps/454).
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link path has a typo. The text shows "/documentation/provider/ffm" but based on the file structure it should be "/documentation/providers/ffm" (plural "providers").

Suggested change
This is a big release with almost 400 commits and 300+ files added/changed...! **Pi4J V4 introduces the new [FFM plugin](/documentation/provider/ffm) and bumps the Java version to 25**. The FFM plugin makes use of the now Foreign Function & Memory API (FFM) to access the GPIOs. The FFM API got introduced in Java 22 with [JEP 454](https://openjdk.org/jeps/454).
This is a big release with almost 400 commits and 300+ files added/changed...! **Pi4J V4 introduces the new [FFM plugin](/documentation/providers/ffm) and bumps the Java version to 25**. The FFM plugin makes use of the now Foreign Function & Memory API (FFM) to access the GPIOs. The FFM API got introduced in Java 22 with [JEP 454](https://openjdk.org/jeps/454).

Copilot uses AI. Check for mistakes.
* [V3.X.X](/about/info-v3): Based on Pi4J 2.8.0 and Java 21.
* Please [read this blog post for more info](/blog/2025/20250211-welcome-java-21/).
* [V4.X.X](/about/info-v4): Based on Pi4J 3.0.3 and Java 25, introducing the [FFM plugin](/documentation/providers/ffm/).
* Please [read this interview with Nick Gritsenko (aka DigitalSmile) for more info](/blog/2025/2025????-interview-nick-ffm/).
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blog post link appears incomplete with "2025????" in the URL. This should be replaced with the actual date to match the blog post file name "2026-interview-nick-ffm.md" (which is dated 2026-02-20).

Suggested change
* Please [read this interview with Nick Gritsenko (aka DigitalSmile) for more info](/blog/2025/2025????-interview-nick-ffm/).
* Please [read this interview with Nick Gritsenko (aka DigitalSmile) for more info](/blog/2026/20260220-interview-nick-ffm/).

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +26
* ...
* Contra
* ...
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Pro/Contra sections for the FFM provider are empty with just "...". These should either be filled in with actual content or removed if not yet determined. Since this is a major new feature, having these benefits and limitations documented would be valuable.

Suggested change
* ...
* Contra
* ...
* Uses Java's Foreign Function & Memory (FFM) API instead of JNI for native access
* Reduces native glue code and simplifies deployment of native libraries
* Designed as a modern, future‑oriented provider for newer Java runtimes
* Contra
* Requires a recent Java version that supports the FFM API (Project Panama)
* Newer provider that may not yet cover all I/O use cases supported by longstanding providers

Copilot uses AI. Check for mistakes.

Requires Java 25, see [What's New in V4](/about/info-v4/) for more info.

### 2025-02-20 - V4.0.0
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release date format is inconsistent. Line 12 shows "2025-02-20" in the heading but line 7 in the main index shows "2025-02-20" as well. However, the blog post about V4 is dated 2026-02-20. This date discrepancy needs to be resolved for consistency.

Copilot uses AI. Check for mistakes.

Thanks to contributions by [@DigitalSmile](https://github.com/DigitalSmile), [@IAmNickNack](https://github.com/IAmNickNack), [@stefanhaustein](https://github.com/stefanhaustein), [@taartspi](https://github.com/taartspi), [@eitch](https://github.com/eitch), [@fdelporte](https://github.com/fdelporte).

Detailed list of all the changes: https://github.com/Pi4J/pi4j/compare/3.0.3...4.0.0
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect reference to GitHub compare URL. The text "Detailed list of all the changes: Pi4J/pi4j@3.0.3...4.0.0" should use the correct tag format. Based on the pattern, it should likely be "v3.0.3...v4.0.0" with the 'v' prefix for version tags.

Suggested change
Detailed list of all the changes: https://github.com/Pi4J/pi4j/compare/3.0.3...4.0.0
Detailed list of all the changes: https://github.com/Pi4J/pi4j/compare/v3.0.3...v4.0.0

Copilot uses AI. Check for mistakes.
@FDelporte FDelporte deleted the release/V4.0.0 branch February 20, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants