Java Periphery released!

Post Reply
sgjava
Posts: 67
Joined: Mon Dec 29, 2014 7:47 am
languages_spoken: english
ODROIDs: C1, C1+, C2, XU4
Has thanked: 1 time
Been thanked: 3 times
Contact:

Java Periphery released!

Post by sgjava » Tue May 19, 2020 9:35 pm

https://github.com/sgjava/java-periphery

Java Periphery is a high performance library for GPIO, LED, PWM, SPI, I2C, MMIO and Serial peripheral I/O interface access in userspace Linux. Rather than try to build this from scratch I used c-periphery and HawtJNI to generate the JNI wrappers. This saves a lot of hand coding and allows for easier synchronization with c-periphery changes moving forward.

Java Periphery will be targeting Armbian, but the code should work with most Linux distributions. Demo apps are included that illustrate how to leverage the bindings. The idea is to have consistent APIs across C, Python, Lua and JVM languages without having to use hacked up RPi.GPIO or Wiring Pi implementations for each distinct SBC model. The possibility of using other JVM based languages such as Groovy, Kotlin, Scala, etc. opens up language opportunities that do not currently exist in the IoT space.
These users thanked the author sgjava for the post:
rooted (Wed May 20, 2020 12:00 am)

User avatar
rooted
Posts: 7606
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 665 times
Been thanked: 177 times
Contact:

Re: Java Periphery released!

Post by rooted » Tue May 19, 2020 11:59 pm

Very interesting, while I hate Java since I write Android applications occasionally it's nice to see this.

Do you think it will function with Android without modifications?

sgjava
Posts: 67
Joined: Mon Dec 29, 2014 7:47 am
languages_spoken: english
ODROIDs: C1, C1+, C2, XU4
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Java Periphery released!

Post by sgjava » Wed May 20, 2020 1:26 am

It's based on kernel userspace, so I'm not up on Android underpinnings, but there are people running native C apps on Android platform. Plus this is for standard JDK 11/JNI/C, so I'm not sure how easy that would be to get working. The main thing I like is I can use the same API a diverse set of SBCs like Nano Pi Duo, Odroids, etc.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests