hubmartin / ESP8266_WS2812B_UDP

Light effects over network with Processing and ESP8266
MIT License
20 stars 6 forks source link

RuntimeException: Waited 5000ms for main-FPSAWTAnimator #4

Closed launchd closed 6 years ago

launchd commented 6 years ago

I'm attempting to run your code on Processing 3.3.7, I'm using the latest version of the libraries you included that I could find but I'm not able to get passed this error. The full error text is: java.lang.RuntimeException: Waited 5000ms for: <6e53978c, 60947436>[count 2, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-FPSAWTAnimator#00-Timer0-FPSAWTAnimator#00-Timer1> at processing.opengl.PSurfaceJOGL$2.run(PSurfaceJOGL.java:410) at java.lang.Thread.run(Thread.java:748)

I assume its an error with opengl since they made updates to how P2D works, but I can't seem to find any solutions online.

launchd commented 6 years ago

I was able to bypass this error by commenting out line 35 where the framerate is set to 25. The device was found but unfortunately I'm not getting any display. I switched over the code from NeoPixel to DotStar, so that may be why I'm not getting any display. But the code is nearly identical for both and I know DotStars work find on ESP8266

launchd commented 6 years ago

So I got it working. I had to move the Wifi code from the loop to the setup, as it was trying to connect again even when it was connected for some reason. Then I had to update the data/config.xml file to match my local IP on the device (this wasnt evident as there is no real readme or instructions). Thank you @hubmartin this is amazing.

hubmartin commented 6 years ago

I'm glad you have it running. Can you post a video of animation on the Dotstar? I never used this streaming on any 2D surface, I'd be interested in the framerate and stability. Thanks.

launchd commented 6 years ago

I can post a quick video that I took, but I need to reduce the brightness and take another video. Also, what do you mean you've never used this streaming on any 2D surface? Link to GIF

The stability isn't bad but there seems to be a bit of lag when I move the LEDs around the canvas in processing. Edit: Framerate is decent, but there's definitely a few hundred milliseconds of lag.

launchd commented 6 years ago

I switched to using the FastLED library instead of the default adafruit and there is zero lag. As you can see in this gif. FastLED allows for easy color correction and temporal dithering, aside from the fact that its just fast. I'd love to post a fork of what I've got when its cleaned up

hubmartin commented 6 years ago

Thanks for video in action. Looks very fast. I had some issues with 5 or more of these devices on my router. Not sure what was the cause.