When will the latest version of Pi4J be released?

Skip to first unread message

Daniel Mårtensson

Jun 10, 2020, 6:32:53 PM6/10/20
to Pi4J

I'm building a logger software and I'm planing to use Pi4J.

I have heard that Pi4J dropping WiringPi now and using another library for hardware communication.

Is there any schedule for this?

Very important for me to access hardware PWM! I know that 3B+ have 4 PWM pins.

Frank Delporte

Jun 11, 2020, 11:02:59 AM6/11/20
to Pi4J
Work is ongoing at this moment to make a new version of V1 which still uses WiringPi.

But indeed a new V2 is also in progress which uses PiGpio (or other) and can already be used as proof-of-concept from https://github.com/Pi4J/pi4j-v2

Schedules are not available, this is OSS so as you will understand, depends on the time contributors can spend on the project.

Best regards

Jim Darby

Jun 11, 2020, 11:05:59 AM6/11/20
to pi...@googlegroups.com

I'm working quite hard on pi4j-v2 and its use of pigpio. It's quite… interesting and there are several issues that are being resolved. Right now it's not for the faint-hearted and I'd stick to V1.

Having said which, if you want Java 11 right now then please feel free to talk about it. We have some help and work-arounds for you.


You received this message because you are subscribed to the Google Groups "Pi4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pi4j+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pi4j/111db214-9084-4ad2-96e7-8b36c780fd39o%40googlegroups.com.

Robert Savage

Jun 11, 2020, 11:35:12 AM6/11/20
to Pi4J
PWM is definitely supported and if I recall correctly, the PiGpio library provides better support for PWM.
Here are a few simple examples using Pi4J V2.

Like Jim said, V2 is still very much experimental.  However, I did use PWM to drive some audio channels in a V2 demo that I gave at the last JavaOne/CodeOne conference.
Thanks, Robert

Daniel Mårtensson

Jun 11, 2020, 12:45:49 PM6/11/20
to Pi4J

I have quit using Java 8. I'm using Java 11.

Try to see if you can use GraalVM with Pi4J. I have heard that GraalVM result a very fast benchmark.

Daniel Mårtensson

Jun 11, 2020, 12:58:29 PM6/11/20
to Pi4J
I'm planning to buy a Raspberry 4B due to its high ram.

Is it possible for you to upload a alpha version of Pi4J V2 on Maven central?

My project is a web application where I'm including Pi4J. It going to be a open source project avaiable on my GitHub.

Ok. Good that Pi4J v2 have hardware PWM. 4 outputs?

Does v2 have SPI and digital in?

I can help with writing examples for Pi4J.
I have lots if STM32 libraries written in C code.


Robert Savage

Jun 11, 2020, 2:26:41 PM6/11/20
to Pi4J
Publishing to Maven central requires a release cycle and we are not ready for that just yet.  
You can however access the v2.0 SNAPSHOT artifacts in the SONATYPE OSS SNAPSHOT repository 

>  Good that Pi4J v2 have hardware PWM. 4 outputs?

It should.  We don't do anything at the moment to quality which pins support what type of functionality.  So if it's supported by the underlying PiGpio library, then it should work in Pi4J V2.

You will need to manually download and install the latest PiGPIO. lib. http://abyz.me.uk/rpi/pigpio/

>   Does v2 have SPI and digital in?

Yes, it will support the following I/O types:
  • PWM
  • I2C
  • SPI
  • SERIAL (RS232)

Daniel Mårtensson

Jun 11, 2020, 3:29:03 PM6/11/20
to Pi4J

I will try pi4j-core-2.0-20200611.181858-9.jar with Raspberry Pi 4B and see how it's working.
Reply all
Reply to author
0 new messages