JScrollPhat - Java Scroll pHAT package
Download
JScrollPhat 1.0 (1.5M - includes source code) - What's new?
What is the Java Scroll pHAT package?
JScrollPhat is a Java library for the ISSI IS31FL3730 matrix LED driver chip used in the Pimoroni Scroll pHAT (Parial Hardware Attached on Top), which is a little LED matrix board that attaches on top of a Raspberry Pi Zero and other compatible Raspberry Pi models.How do I use the Java Scroll pHAT package?
The Java Scroll pHAT package is written in pure Java, runs on JDK 1.6 or later, and requires no special installation - just add the jar file to your classpath.
It is also available on Maven Central at the artifact coordinates
net.freeutils:scrollphat-core:1.0
.
For native access to the I2C bus which communicates with the device, the library uses either Pi4J or JNA, So you will need to have one of them installed as well.
The API itself consists of several main classes:
-
Device
: An abstract class that provides access to the raw functionality of the IS31FL3730. -
Pi4JDevice
: A Device implementation that uses Pi4J for the low-level I2C communications with the physical device. -
JNADevDevice
: A Device implementation that uses the /dev/i2c-* device interface, with the help of JNA for native calls, for the low-level I2C communications with the physical device. -
MockDevice
: A mock Device that does not connect with the real device, but instead prints the commands sent to the device to the console, and outputs the display state as ASCII-art. This is very useful during development and debugging on a separate PC or a Raspberry Pi with no Scroll pHAT attached to it (yet). -
Canvas
: A convenience class for manipulating a LED matrix buffer and preparing the display content. -
Animations
: Provides common animation utilities such as gradually changing brightness or scrolling content across the display. -
LEDFont
: A lightweight font format that can render text for display on the device. -
FontConverter
: A Utility class for converting TrueType (TTF) fonts into ledfont format for use on the device. Only one font is included by default, but you can easily add additional ones, provided that they look reasonably well when scaled down to a height of 5 pixels. See class docs for details.
The source code contains elaborate documentation for the classes and methods it provides.
Some usage examples are available in the scrollphat-examples
module.
What's New?
In version 1.0:
- This is the first release of the Java Scroll pHAT package.
License
The JScrollPhat Package is provided under the GNU General Public License agreement.For non-GPL commercial licensing please contact the author.
Donate
If you like it, why not give something back?
13aWWmQqkiYnpkWT7QmE9khnpuuuG48U7o
Contact
You can contact the author via e-mail at:Please write in with any bugs, suggestions, fixes, contributions, or just to drop a good word and let me know you've found the JScrollPhat Package useful and you'd like it to keep being maintained.
For updates and additional information, you can always visit the website at: