New topology of Pi4J repo: what about device and gpio-extension?

30 views
Skip to first unread message

GeertVc

unread,
Aug 2, 2020, 8:51:58 AM8/2/20
to Pi4J
I read about the reason why the newest state of the Pi4J repo has been "cleaned out".  I can understand one doesn't want to take the burden of "exotic" RPi clones in a repo that is mainly focusing on having a kind of HAL between Java and RPi.

However, not all of the items in the above mentioned disappeared directories were related to those exotics.  For instance, the gpio-extension directory had many useful abstractions for very popular devices, among a lot of others, the MCP23017 IO expander.
Also the device directory had very useful functionalities, like controlling relays and so on...

My question: what about these two directories (device and gpio-extension)?  Will they be maintained in separate repo's after cleaning out the exotics?  What if I have code still using parts of both device and gpio-extension and I want to switch to Pi4J 1.4?

It's all a bit fuzzy to me what the future will bring and what I currently have to do to maintain my current code base while trying to use the Pi4J 1.4 release (and in the future, Pi4J 2.0).

Frank Delporte

unread,
Aug 3, 2020, 5:25:02 AM8/3/20
to Pi4J
For the V2 version of Pi4J it would be great to have (some of) the devices code in an example project e.g. pi4j-examples-devices, similar to the existing https://github.com/Pi4J/pi4j-example-minimal

Support for specific support could also be provided as plugins, see https://v2.pi4j.com/plugins. This could be done as separate projects within the Pi4J GitHub project and/or as separate projects maintained by others.

You're right we want to minimize the core-code and don't need to do full testing on all kinds of devices before a new version can be released. But we are still looking for the perfect solution which still provides enough information for new/existing users, while keeping the core code minimal. Any ideas/suggestions are more than welcome!

Frank


,

Daniel Mårtensson

unread,
Aug 3, 2020, 5:31:19 AM8/3/20
to Pi4J
I suggest a tutorial how to rewrite Arduino C++ code to Java Pi4J code.

And also Pi4J should have access to the camera. I have a image classification library that are 100% Java. Go to jFaces, my GitHub repository.

GeertVc

unread,
Aug 3, 2020, 9:34:28 AM8/3/20
to Pi4J
@Frank: I personally wouldn't go for pi4j-example-devices or the like because the current (at least, up until pi4j_1.2)  device and gpio-extension sub-repos are more than examples.  They're full-fledged operational dedicated pieces of software for a typical hardware device.  

Examples - to me- are more like "How-To's" to show to the audience how to deploy the core code in combination with "auxiliaries" (like device and gpio-extension) to come to a fully functional, usable piece of HW/SW combination.

Then I'd rather go for separate repo's (one for device and one for gpio-extension).  Two advantages:
1. It'll keep more or less the same "topology" for people used to work up until now into the "known" setup of Pi4J.  You know more or less where to find what and that doesn't have to change.
2. You can immediately start with the current, existing code base for both items and create those 2 repos.

This can all be developed more or less independent from the core development done in the "pure" P4J project (well, both device as well as gpio-extension will depend on the core of course , but not vice versa and that's the aim, I guess...).

Suggested repo names:


My 0.02...

Best rgds,
--Geert 

Reply all
Reply to author
Forward
0 new messages