DRAFT: Release notes V4 and interview Nick#85
Conversation
# Conflicts: # content/_index.md
taartspi
left a comment
There was a problem hiding this comment.
two comments. thanks for all the documentation work.
There was a problem hiding this comment.
@DigitalSmile can you please review this version of the FFM plugin page? Is the info correct regarding the dependencies and permissions scripts?
|
Looked over that latest files. Looks good |
# 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
# Conflicts: # content/about/release-notes.md
There was a problem hiding this comment.
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/). |
There was a problem hiding this comment.
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).
| 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/). |
| </dependency> | ||
| ``` | ||
|
|
||
| When using FFM API functionality added to Java in version 22, you will be alerted at startup of the applicatoin with this message: |
There was a problem hiding this comment.
Typo: "applicatoin" should be "application".
| 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: |
| * 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`. |
There was a problem hiding this comment.
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`."
| * In the root of the `pi4j directory, run `mvn clean install`. | |
| * In the root of the `pi4j` directory, run `mvn clean install`. |
| ```java | ||
| input.addListener(e -> { | ||
| if (e.state() == DigitalState.HIGH) { | ||
| if (e.state() == DigitalState.LOW){ |
There was a problem hiding this comment.
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.
| if (e.state() == DigitalState.LOW){ | |
| if (e.state() == DigitalState.HIGH){ |
|
|
||
| ### 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). |
There was a problem hiding this comment.
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").
| 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). |
| * [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/). |
There was a problem hiding this comment.
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).
| * 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/). |
| * ... | ||
| * Contra | ||
| * ... |
There was a problem hiding this comment.
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.
| * ... | |
| * 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 |
|
|
||
| Requires Java 25, see [What's New in V4](/about/info-v4/) for more info. | ||
|
|
||
| ### 2025-02-20 - V4.0.0 |
There was a problem hiding this comment.
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.
|
|
||
| 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 |
There was a problem hiding this comment.
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.
| 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 |
WORK-IN-PROGRESS