Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with DMX #462

Closed
raress96 opened this issue Dec 15, 2019 · 12 comments
Closed

Integration with DMX #462

raress96 opened this issue Dec 15, 2019 · 12 comments
Labels

Comments

@raress96
Copy link
Contributor

Hello,
I want to make a usermod to integrate this library with a DMX light, similar to this:
https://www.youtube.com/watch?v=4PjBBBQB2m4

What I was thinking is to have the light as another pixel in the strip, but I am not sure how I can do that. If that is not possible, then I would like at least for the effects to be applied to the DMX light as well.

How can I have access in the userLoop function to the current effect, or the value of a pixel from the strip so I can update my DMX light?

@Aircoookie
Copy link
Member

Hi!
That sounds like a really cool idea! You can get the color of any pixel quite easily:
Just use strip.getPixelColor(i). That will give you the color in uint32_t format. If you need the R,G,B components, you can do:

uint16_t pixel = 0;
uint32_t in = strip.getPixelColor(pixel);
byte r = in >> 16 & 0xFF;
byte g = in >> 8  & 0xFF;
byte b = in       & 0xFF;

Looking forward to what you come up with and let me know if you need anything else :)

@jwingefeld
Copy link
Contributor

I want to make a usermod to integrate this library with a DMX light, similar to this:
https://www.youtube.com/watch?v=4PjBBBQB2m4

Hello raresserban,

i am currently working on this. It already works, i just have to make it "user servicable". Let me know if you want to try it out.

/Jan

@raress96
Copy link
Contributor Author

@jwingefeld It would be great if you could share the code!I tried something but with not luck so currently I am waiting for a new DMX cable, didn't have time to do this for christmas.

@jwingefeld
Copy link
Contributor

I will let you know when it is usable. Should be a matter of days.

Please note that you will need a MAX485 chip connected to your ESP8266.

@abyssdj
Copy link

abyssdj commented Feb 4, 2020

I will let you know when it is usable. Should be a matter of days.

Please note that you will need a MAX485 chip connected to your ESP8266.

I would also be interested in this. I've recently discovered WLED and it fits my requirements perfectly for LED strips, but would also be great to have a DMX counterpart, so that all the nodes use the same software. Extra bonuses would be "effects" for pan/tilt, etc to be able to run a basic display as a fallback when not receiving sacn.

@abyssdj
Copy link

abyssdj commented Feb 6, 2020

Extending on the above, would it be possible to have Artnet as an alternative option to sACN? I find it faster and more suitable in my case.

@Aircoookie
Copy link
Member

@abyssdj yes, ArtNet support has also already been requested in #417

@abyssdj
Copy link

abyssdj commented Feb 7, 2020

@abyssdj yes, ArtNet support has also already been requested in #417

Perfect!

@jwingefeld
Copy link
Contributor

It's done! It works and it's in WLED.
To try DMX output support, you'll need to grab the latest source (not binary) from github and compile it yourself. Further instructions are here: https://github.com/Aircoookie/WLED/wiki/DMX-Output. Let me know if you need any help or if the instructions are unclear.

@raress96
Copy link
Contributor Author

Thanks @jwingefeld, finally had the change to test it after I got my DMX cable and it works beautifully!

Now to have WLED support both DMX and normal leds, and have the DMX light as a segment :D
I think I am going to work on this and maybe submit a MR if it works properly.

@abyssdj
Copy link

abyssdj commented Apr 11, 2020

I had a chance to mess around with this, but found it reasonably unresponsive for some reason. I found that it would often miss colour changes, etc. I'll experiment some more. That may be something at my end, but either way, what I would like to see is a way to specify a range of channels that are just dmx output, just (for example) plain artnet-dmx. Would this be possible?

As an example of the setup, segment 1 may be channels 1-180 may be set as 60x rgb led's, followed by segment 2 using 181-200 as basic dmx channels, for controlling moving heads, etc.

"Advanced" functions that would be nice to see would be the ability to set a channel to "random" (for pan/tilt - I did modify a few lines very quickly to try this, it kind of worked) or set channels which would cover rgb fixtures to apply colour 1/2/3 of the pallete of the current preset, and so on. That way, it could be a very nice, basic standalone setup. The fact that it would fall back to this within seconds when SACN goes down would make it great as a backup.

@harueg
Copy link

harueg commented Nov 26, 2020

Hi @jwingefeld

I tried to compile it for an AZ Delivery ESP-32 Dev Kit C V4 but didn't work, is rebooting constantly.
I've set DMX sendpin to gpio23, ledpin is at gpio2
the downloaded binary itself works.
The source of the wled 0.10.2 has the dmx already enabled, but I can't see any dmx button on the UI.
@Aircoookie Maybe it is not enabled in the binary ?

What other settings might be necessary ?

Thank you

Harald

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants