0

I'm controlling an WS2812 LED strip in which every 2 leds is controlled together - they are setup as "eyes" in a prop. I'm looking to control hundreds of these, so in an effort to save RAM I'd like to have each byte in the LED color array represent 2 LEDs. That is to say that when the FastLED library writes to the data lin I want it to duplicate every byte going out.

I've dug into FastLED code but get lost around the timings deep down in the code.

Any ideas?

  • use an ESP, they have plenty of RAM. modifying the code to save ram will be a lot of work and probably limit features/updates. – dandavis May 27 at 4:16
  • @dandavis I’m trying to use up a pile of atmega328 chips that I have. Saving the 400 or so bytes would be perfect without reworking the board. However, o have a bunch of old atmega1284 chips too. Going that route. – TheSoftwareJedi May 28 at 3:10
1
  • The FastLED community appears to live at this reddit.com site. Consider asking your question there.
  • It is unknown if the following will exceed the current limitations of the Arduino platform you are using. But, consider sending the same data to two different strings of LEDs simultaneously. Briefly, each LED strips off the 1st packet of data and sends the balance of data through to the next LED. Two different strips should behave the same if given the same data. Thereby creating the effect you described (pairs of LEDs behaving the same).
  • I'm dealing with premade strips of eyes, so the two strip idea isn't feasible at this time. Thanks for pointing me to the subreddit. I've posted there. – TheSoftwareJedi May 25 at 14:46
  • A quick look at the FastLED repository and it looks like it is very complex and possibly created for multiple Arduino platforms (that is, different processors). As such you need to specify exactly what hardware you are using. Something you didn't list here. And something that is specifically asked for over at the reddit.com site. More to the point, the transfer rate to feed the LEDs can be very high and direct memory transfer for some of the higher end processors is a possibility. In such a case it may be difficult to save much on memory. – st2000 May 25 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.