lyriarte / StripDisplay

Display text and bitmaps on strip led panels.
BSD 2-Clause "Simplified" License
5 stars 0 forks source link

Don't set port directions in this library! #4

Closed HasseM closed 1 year ago

HasseM commented 1 year ago

Ln 37 StripDisplay.cpp pinMode(gpio, OUTPUT);

This is conflicting with FastLED and cause of instability. I had lots of problems untill I removed that line.

lyriarte commented 1 year ago

Really? I never had an issue with FastLED so far. Let me check it out.

HasseM commented 1 year ago

Probably. Let me add some more information. I got a whole lot of problems to get it working on a raspberry pi pico that runs as a Corsair device for integration with iCue and WS2812B Leds. But eventually the only change I made to the library was remove that line. It is not needed for FastLed and from a software design point of view, this should not be in that library. In fact that makes the whole GPIO variable in the library as being not used. The library isn't working on ports, it is working on fastled. So let fastled handle the ports!

But now I got it all working nicely!

Edit: While thinking about it.... it may be the fact that I use WS2812B leds. It may have looked to me that the software crashed because I needed a hard reset of my RPi Pico with Bootsel button held down. Later I found out that the board wasn't crashed, the serial port changed number.... causing the Arduino IDE to tell me the board was missing. So I am not sure about crashing. I am sure about it not working in terms of no leds turning on.

lyriarte commented 1 year ago

Ok, I never tried it on raspi, only ESP8266 boards. But overall I agree it should not even need to know about the GPIO to use. I did this a while ago, not sure if the version of FastLED evolved or if I had no reason at all to do this to begin with. I'll figure out if it was ever needed and make it optional or remove it altogether.

lyriarte commented 1 year ago

Fixed in version 0.5.2