You don’t have to load all the templates. I can think of at least two methods of selecting which controller to use, without needing to reprogram the Arduino each time. It all depends on how “feature rich” you want to make it to the end-user. Then there’s also the option of using an AVR with more memory.
As for the programming interface itself, the simplest thing to add after the ICSP header, is an FTDI which will allow the end-user to use a regular USB cable.
How would you go about supporting all the FastLED types without compiling the different templates and increasing the program size?
That would depend on how you want to implement it. You can tell the end user that they must only use ONE specific LED strip across all four ports, whether it’s WS2801, WS2811/12, LPD8806, or any of the other variants. But it has to be the same across all ports. Then you can have a dip switch that the user configures which tells the AVR which strip is connected. By reading the value of the switch, you can then create either a switch case or if/then/else case that selects which FastLED controllers gets loaded.
If you want to allow multiple variants of the controller, you can implement it with an external source. Let’s say a text file on an SD card that the user creates, defining what each string it, on which port, and how long. The AVR then reads this data file and creates the necessary controllers based on that. However, that will increase the (compiled) program size.
Doing some testing, it looks like each controller will add somewhere between 2-3K to the final compiled program. Not knowing what kind of constraints you’re working with, how much space the current ArtNet implementation takes, it’s hard to suggest what to do. One option is to use a larger AVR.
@Ashley_M_Kirchner_No that was my thoughts exactly. The problem is that I only have about 4kb program memory left on the mega328.
So then your options are to either a) give the user the ability to select which type of string they’re using and it applies to all four ports (all have to be the same), or b) move to a larger AVR.
Hi
I think it would be quite useful for this project and edit this ethernet bootloader for easy updates firmware.
http://www.ulrichradig.de/home/index.php/avr/avr-etherboot
Hey Tobias, sorry to hijack this thread, but I’ve got a question for you. I set up your Arduino Artnet library and FastLED on my Uno/Standard Ethernet Shield (W5100). The library claims that the standard shield should be able to handle 30fps on 1 universe, but I’m seeing barely 2fps and I’m only testing it with 50 LEDs! Any thoughts? Here’s the sketch I’m testing with (a modified version of your example Artnet sketch): http://pastebin.com/JtMstHyi
Hi @Billy_Quesse . Your code looks all right, although I have not tested it myself. Why did you comment out the clock divider setting? One problem I did notice, though, is that you copy the dmx payload (512 bytes) into your RGB array, which is only 150 bytes (3x50). Try increasing your array to 171 LEDs (513 bytes). Cheers.
@Tobias_Ebsen Thanks for the input! After increasing the array size, I was able to achieve very fast FPS. The problem now is that the LEDs flicker between the DMX data and full off at a very high rate. I’ve found that I can manage the flickering if I add a delay into the code, but this is just a temporary solution. The current iteration of my code simply copies as many bytes as it needs from the DMX data based on how many LEDs are currently attached (in my case, a strand of 50). It still exhibits this flickering, unfortunately. Also, there appears to be no discernable difference between the clock divider setting being turned on or off. Have you ever encountered this flickering? It’s also worth noting that I tried Adafruit’s NeoPixel library combined with a compatible ArtNet library, and everything works just fine. Why not just use that? I still think FastLED is faster, and I suppose I’ve got a soft spot for it since I’ve been using it since its inception.
Here’s the latest: http://pastebin.com/17EdBZQi
Hi @Billy_Quesse . Strange about the flickering – and especially if the delay resolves it. Sounds a bit like the W5100 is being overloaded with data. What software is feeding the ArtNet data? And can you throttle its frame rate? Sending more than 30fps may cause issues with the W5100. I have previously experienced flickering if the Ethernet chip is being filled with data too fast, which makes the packages corrupt.
The NeoPixel library is good and takes up very little program memory, but it has the drawback of allocating its pixel memory within the class. It is thereby not suitable for multiple output ports, as it requires a lot of memory.
My combination of FastLED and my own ArtNet library can support 4 x 170 pixels, which no other library can. You can even avoid the memcpy() call, if you look at my OpenPixelNode.
Hope this helps.
Hello Tobias,
I’m looking for a board for control digitally-addressable LED with Madmapper but I’m totally new to Arduino and programming.
Could you please answer to the following questions?
-How many led can I control for each output?
-How many Artnet universe can I manage with this board?
-Is it compatible with E.31?
Hi @Simone_Zullino . It has 4 outputs, which is each an ArtNet universe with 512 channels (170 RGB pixels) – in total 680 pixels per box. It does currently not support sACN E1.31.
Hi Tobias, I sent you a private message on Hangout.
hi tobias i am looking for a protokol between my teensy 3.1 and ucs1903 ledstring to glediator can you help me ?
Hello @Tobias_Ebsen I am trying to compile your OpenPixelNode sketch onto an Arduino with an ethernet shield, I am running into the following problem… can you offer any insight?
OpenPixelNode:90: error: no matching function for call to ‘SK6812Controller<0u, GRB>::show(CRGB*, unsigned int)’
C:\Program Files (x86)\arduino-1.0.1\libraries\FastLED/controller.h:394: note: candidates are: void CPixelLEDController<RGB_ORDER, LANES, MASK>::show(const CRGB*, int, CRGB) [with EOrder RGB_ORDER = GRB, int LANES = 1, long unsigned int MASK = -1ul]
I get this problem across all 4 ports…
Thanks
James