mattjlewis / diozero

Java Device I/O library that is portable across Single Board Computers and microcontrollers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos / Pico. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
https://www.diozero.com
MIT License
261 stars 59 forks source link

Hardware revision is not supported #98

Closed TheHeroGhost closed 1 year ago

TheHeroGhost commented 2 years ago

Hello,

If i try the test programm its working all but if i try a java programm im getting this error:

ws2811_init failed: Hardware revision is not supported Exception in thread "main" java.lang.RuntimeException: Error initialising the WS 281x strip at com.diozero.ws281xj.rpiws281x.WS281x.(WS281x.java:154) at com.diozero.ws281xj.rpiws281x.WS281x.(WS281x.java:121) at de.theheroghost.WS28Test.main(WS28Test.java:14)

can anyone help me please? this is my code:

package de.theheroghost;

import com.diozero.ws281xj.LedDriverInterface; import com.diozero.ws281xj.PixelAnimations; import com.diozero.ws281xj.PixelColour; import com.diozero.ws281xj.rpiws281x.WS281x;

public class WS28Test {

 public static void main(String[] args) {
     System.out.println("Test Neo starting");
     int brightness = 64;
     int num_pixels = 6;
     LedDriverInterface statusLed = new WS281x(18, brightness, num_pixels);

     int[] colours = PixelColour.RAINBOW;

     for (int i=0; i<250; i++) {
         for (int pixel=0; pixel<statusLed.getNumPixels(); pixel++) {
             statusLed.setPixelColour(pixel, colours[(i+pixel) % colours.length]);
         }

         statusLed.render();
         PixelAnimations.delay(50);
     }
 }

}

and this is my raspi:

Hardware : BCM2711 Revision : d03115 Model : Raspberry Pi 4 Model B Rev 1.5

mattjlewis commented 2 years ago

I need to rebuild the rpi_ws2811 library - will do that as part of the 1.3.4 release. See https://github.com/jgarff/rpi_ws281x/issues/483

mattjlewis commented 1 year ago

Missed the 1.3.4 release as needed to fix the cross compilation using podman - just committed new build that will be included when 1.3.5 is released

mattjlewis commented 1 year ago

Should be fixed in 1.3.5