Hi,
I’m new to fastLED and the community.
I’m no expert in electronics. I have a question. As I’ve red using fastLED we generate an array of data which consists of 24bits of data (0 and 1) for each LED and then send them. It seems very easy. My question: can I generate the arrays using a computer software in a txt file and then read the file from an SD card and show them. Which way will be faster? reading a txt file or generating the arrays in the mcu?
Well that depends on your algorithm, and to some degree which type of SD card you use (some types respond faster than others). It also depends on which board you use. 8 bit AVR like Arduino Uno is very slow, so reading from a SD card may be faster if the algorithm is even moderately complex. 32 bit boards like Teensy 3.2 and Arduino Due are much faster. Especially if your code uses 32 bit integers (not floats), generating the pattern in real time might be faster than a SD card could read. It also depends on the type of LEDs and which driver you use. The more expensive APA102’s are very fast, which leaves more time for your code. The cheaper WS2812’s are slow, but if you use the OctoWS2811 driver, the slow update is done with DMA which leaves the CPU free for generating the next frame. You have many choices which affect the performance, so it really depends on factors we don’t know from your question.
Thank you for your reply. What I have in mind is a graphical computer software which I can select colors and patterns graphically and the software write a txt file to an SD card and then read it by an Arduino, maybe UNO or if not fast enough Due. I think It would be cool.
For 1000 LED with SD card and arduino UNO or Mega you can do this. I doing same project like this and probably it finished in the next week .I will upload a video of my work.
Wow, I’m waiting to see your work, If reading speed is more that generating the arrays a computer program can be written to generate effects graphically. Good luck Alireza jan!
Thanks Mohandes!
I wrote a program with c# that convert gif picture to array code.
I have n’t any problem in software but hardware trouble me a bit!
LEDs have noise in some effect because of the high current consumption.
They have noise on the microcontroller?