![]() If you were going to choose a processor for a semi-permanent installation, I would definitely go with the ESP8266. High frame rates (too high to be realistic, I think) are easy, and I haven't yet probed the limits of display size. So far, the ESP8266 clearly wins for RAM and processor speed from among the devices I've tested with. See "Customizing the pos() Function" below for more details about this.Ī big "Thank You" to Tom De Backer for the ESPHome adaptation. ![]() You will only need to customize pos() if the configuration switches provided don't adequately cover your matrix's pixel arrangement. The included implementation of pos() uses several preprocessor macros in the attempt to support the most common arrangements. It maps a "canonical" column and row address to a linear pixel address. In order to map the rectangular physical arrangement of LEDs into their linear electrical implementation, the function pos() is used extensively. It views a matrix as it is electrically - a linear arrangement of LEDs. When configuring a linear strip, set the matrix width to 1, and the height to the number of pixels in the string.Īlso note that FastLED is a really fast library for sending pixels out to LED strings (kudos!), but it's not a matrix library. Tip: Don't have a matrix handy? I think the simulation also looks really good on a long one-pixel-wide strip. If you get it running in a different configuration, please let me know! Also, see "Matrix Size and Processor Selection" below for more information. a NodeMCU/ESP8266 using the 44x11 matrix.an Arduino Mega 2560 using a matrix of 44x11.Note: When I say "large" in this context, I do not mean physical size it always and only means the total number of pixels. After getting the effect right, I went through and tried to optimize a bit, particularly for memory use, to try and squeeze in larger displays on the lesser Arduinos. To simulate the licking flames of fire, I added random "flares" in the fire that rise from the bottom of the display, and also radiate outward, which I think is really the thing that most improves the effect. The simulation does what I think pretty much everyone does at the most basic level: establishes "heat" near the bottom of the display and percolates it up, reducing the heat as you go. That worked famously, so after some tweaking and a couple of hours playing with it on both Arduino and a NodeMCU/ESP8266, I was satisfied (for the moment). But it was still not refreshing quite fast enough for my taste, so I moved off the Adafruit libraries to FastLED. So when things started to look like they were going to work well, I dug out a Mega 2560, which had enough RAM to manage the entire 44x11 display. The Uno's RAM topped out at about 11x12, meaning I was using less than 1/4th of the entire matrix width available. I started development with an Arduino Uno and the Adafruit NeoMatrix library, and that worked fine as long as I kept the display size down. It works on any LED matrix supported by FastLED. So I ignored all of those other implementations, and just set about failing repeatedly. There's plenty of code available to do this, but I just wanted to figure out for myself how to code a nice-looking animation. Just on a whim, I decided to make my own fire simulation using a 44x11 WS2812 matrix I had purchased on Amazon.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |