Teensy 4.1 + Ethernet + OctoWS2811 + Art-Net/s.ACN

qualleyiv

New member
Hello all,

I'm looking for some help accomplish a project with my Teensy 4.1. First, let me say that this is far from my first stop and I have searched the forums (not to mention other places). I'm sure the answer is out there, but I'm just not finding it. What I'm looking to do is make a straightforward Art-Net OR s.ACN to pixel bridge with my Teensy 4.1, ethernet, and OctoWS2811 shield. Every project I've come across so far seems to do one or two of these things but never all three. While I'm *somewhat* familiar with Arduino development, I'm no expert and my initial thought that this was going to be more or less of a project where a sketch for this already existed and it might take just a little adjustment. But so far I'm making very little progress. Anyone who might be able to point me in the right direction would be GREATLY appreciated!
 
Are you looking to write one yourself or find an already-made one? If the second, contact me privately; I've made several that are used in commercial projects. If the first, can you describe the difficulties you're encountering?
 
Are you looking to write one yourself or find an already-made one? If the second, contact me privately; I've made several that are used in commercial projects. If the first, can you describe the difficulties you're encountering?

At this point I would like a pre-made one so I will contact you privately. I was mistakenly under the impression that there would be a more complete example available given that the teensy and the octo are really designed for this purpose. I know about the Octo library but it just turned out to be more difficult than I anticipated.
 
Here's my general project structure:
1. Main loop() loops through a list of mini "programs" that execute their own loop(). I don't use threading because it can kill performance. For example, I have an LED refresh "program", sACN receiver "program", webserver "program" for configuration, etc. This keeps the code organized and avoids a monstrous main loop(). Essentially, there's a main "Program" class and all the mini "programs" derive from that.
2. The sACN receiver is written fairly generically, where it calls callbacks when DMX packets or sync packets or whatever are received, or when timeouts happen. I like reading specs, so for my implementation I just implemented the raw E1.31 spec.
3. I use FastLED for LED driving, plus the OctoWS2811 driver for using that hardware.
4. For networking, I use QNEthernet. I made it because I needed something more reliable than what was out there. I also shape it to conform to my needs, so when I need a feature or fix for a project, I make the necessary changes. One of the projects it was developed for is my sACN stuff. That's why, for example, there's UDP buffering — simply give a packet count parameter when creating the `EthernetUDP` object. Size it so when bursts of sACN packets come in, you don't lose any. I was experiencing terrible data rates until I added that buffering. That's also why I believe the library is very stable; it's because I use it in real projects and they've been battle-tested.
5. I use PlatformIO inside VSCode for my development environment because VSCode is a so-called "real" IDE that can do real IDE things.

That's a very basic overview of how I approach these projects. I hope it provides at least a mental model of how to start.
 
Back
Top