meg768 / rpi-ws281x

rpi-ws281x
22 stars 26 forks source link

"Hardware revision is not supported" For Raspberry Pi 4 Model B Rev 1.5 #23

Open marcuszerep opened 2 years ago

marcuszerep commented 2 years ago

The newest Raspberry Pis (at least from Canakit on Amazon) will fail in the https://github.com/jgarff/rpi_ws281x dependency until https://github.com/jgarff/rpi_ws281x/issues/483 is resolved.

When the issue is resolved and solution is pushed there, looking forward to the https://www.npmjs.com/package/rpi-ws281x update.

marcuszerep commented 2 years ago

See fork https://github.com/etcetc/rpi-ws281x which has the code with everything but 1gb (doesn't have most recent code changes from dependency) https://github.com/etcetc/rpi-ws281x/blob/d393229554af04c71465a410dfa1896c7547e5d9/src/rpi_ws281x/rpihw.c#L139

However, the NPM script is not updated.

RikWesselink commented 1 year ago

Thanks for opening this issue. I ran into the same problem and found, with some help, a workaround.

  1. npm install rpi-ws281x

  2. Update the file 'rpihw.c' (which is located in "node_modules - rpi-ws281x - src - rpi_ws281x"). I added: { .hwver= 0xd03115, .type= RPI_HWVER_TYPE_PI4, .periph_base= PERIPH_BASE_RPI4, .videocore_base= VIDEOCORE_BASE_RPI2, .desc= "Pi 4 Model B - 8GB v1.5" },

  3. npm rebuild rpi-ws281x

After the rebuild, it works for me.