-
Hello, I would like to operate a matrix 8x8 on my Raspberry with Pi4j V2.0, unfortunately there are instructions only with crowpi. But I have Raspbian on the Raspberry. Is there a tutorial on how to do it easily with Raspbian and the Matrix? |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 2 replies
-
CrowPi OS is actually the same as Raspbian (now known as Raspberry Pi OS) with some additional settings. So you should be able to run the exact same code on both OS versions. One thing to take into account: if using SPI, you may need to set your Pi4J context yourself instead to make sure the right libraries are used to communicate with SPI over PiGpio as is done on https://github.com/Pi4J/pi4j-example-crowpi/blob/62977aa4564bef6edd4fc50fa6c5feeafaadc0b0/src/main/java/com/pi4j/crowpi/helpers/CrowPiPlatform.java#L29 |
Beta Was this translation helpful? Give feedback.
-
Here is my code. It should be a simple code to test. It worked fine with version 1.4. public class Matrix {
// neu.execute((byte)0x0c, (byte)0x00);
// .baud(baud) class Max7219{
} What else do you have to change? |
Beta Was this translation helpful? Give feedback.
-
How do you mean that exactly? I have to pass parameters for the Max7219 class for the constructor. private static SpiConfig buildSpiConfig(Context pi4j, int channel, int baud) { Does not work like that. |
Beta Was this translation helpful? Give feedback.
-
Now the code works. Is the code okay like that?
|
Beta Was this translation helpful? Give feedback.
-
OK, that works. Thanks very much. |
Beta Was this translation helpful? Give feedback.
-
OK, that works. Thanks very much. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your feedback! |
Beta Was this translation helpful? Give feedback.
Now the code works. Is the code okay like that?