easybotics / node-rpi-rgb-led-matrix

Pilot your rgb led matrix with Nodejs ! Nodejs binding of rpi-rgb-led-matrix library https://github.com/hzeller/rpi-rgb-led-matrix - Actively Maintained!
Do What The F*ck You Want To Public License
56 stars 16 forks source link

Lots of flickering with fill #18

Open abwilson2020 opened 2 years ago

abwilson2020 commented 2 years ago
var LedMatrix = require("easybotics-rpi-rgb-led-matrix");

//init a 16 rows  by 16 cols led matrix 
//default hardware mapping is 'regular', could be 'adafruit-hat-pwm' ect 
var matrix = new LedMatrix(64, 64, 1, 3, 100, 'adafruit-hat', 'RGB', '--led-slowdown-gpio=4');
console.log(matrix.getHeight());
matrix.fill(255, 50, 100);
matrix.drawLine (0, 0, 64, 64, 0, 0, 255)
matrix.update();
while (true){
}

running this code on my 64x64 set of 3 panels creates a very messy and flickering display. The documentation doesnt really show how to add the cli flags, I am guessing I have it wrong because gpio slowdown should help with it. Beyond that the colors dont even seem to be consistent across the panel. Is there something I am missing or is it just buggy?

Also is there an example file that I can work with for testing the library?

abwilson2020 commented 2 years ago

Update: This appears to be an issue with every command other than fill actually. If I run setPixel, drawCircle or drawLine the panel glitches around wildly and the colors get messed up but if I run just fill it works fine in a solid color ie matrix.fill(255, 0, 0) anything but 255 0 0 causes flickering

clowrey commented 2 years ago

I'd recommend debugging all these issues with the main library directly, not with the node-red layer ontop of it all.

abwilson2020 commented 2 years ago

Running the library directly all the examples work. The only thing I couldn't get to work was the video viewer utility. Thats why I was asking for a demo file or something I can run within this extension of the library to test with. If you have it working i'd appreciate some guidance. @clowrey

abwilson2020 commented 2 years ago

I have done a little more digging. The version 3 release in npm doesn't work at all currently, and version 4 and 4.1 are glitchy. Is there an update that perhaps npm doesn't have yet? I see that there is another open issue for the node version to be updated

abwilson2020 commented 2 years ago

After a lot more digging I was right initially when I said that the cli flags are not working and that was causing the issue. @clowrey is there a better way to fix the flags other than going into the .h files, hard coding them and then rebuilding?

clowrey commented 2 years ago

I'm not entirely sure, I'd have to do the same digging you did. @keptan created most of this, maybe he will respond ;)

abwilson2020 commented 2 years ago

ok that would be great. Also is there any functionality for displaying an image or video on the panel? I see setImageBuffer in the readme but it doesn't seem to be in use

clowrey commented 2 years ago

There is working functionality to display animated gifs and even move them across the display ;) but I can't tell you how to use it or if it's fully implemented in the current release... Too busy with other projects and @keptan or @ryanmich251 know allot more

abwilson2020 commented 2 years ago

@clowrey That would be awesome if one of them could help me get the animated gifs working. I figured out how the flags are supposed to be written.

For future reference for people it would be something like: var matrix = new LedMatrix(64, 64, 1, 4, 100, 'adafruit-hat', 'RGB', ['--led-pixel-mapper=U-mapper;rotate:180']);

KillahB33 commented 2 years ago

Hey @abwilson2020 did you get this working?

Python doesn't work so was gonna use this instead but just starting work on it now. EDIT: I should say python kind of half works but I want a web front end anyways so JS makes more sense.

tmahlstrom commented 3 months ago

I'm having the same problem. Main library demos all work fine, but getting tons of flicker with this library using any RGB besides solid colors e.g. 255 0 0

Two years later I think it's safe to assume this package is not managed

clowrey commented 3 months ago

Yup it's not maintained currently ;) but it's open source so if you have the ability to fix or improve anything feel free :). Pull requests will be reviewed and accepted.

I think it's more useful for simple text and shapes.. I have had a weather display (indoor outdoor) running using this for 5 years now 😀 it's still going strong.

KillahB33 commented 3 months ago

I don't know if you guys have any interest in my project, https://github.com/KillahB33/rgb-matrix-app

He was taking too long to get back so I ended up building this instead. I originally wanted it all running on the pi but it seems the rbg library is a bit of a resource pig so my project runs a separate machine