sparkfun / SparkFunDMX

https://www.sparkfun.com/
Other
30 stars 6 forks source link

Example2-DMXInput needs all DMX channels in universe to have a value? #14

Open patrick-smael opened 8 months ago

patrick-smael commented 8 months ago

When testing example 2 with my lighting controller (in my case QuickDMX) I noticed that all of the 512 dmx channels need to have set a value on my dmx output device (D512) instead of being blank (No DMX value -> DMX value 0?) in order for the ESP to correctly read out, in this case, DMX channel 1... So it now takes up a whole universe to be able to read DMX channel input on the ESP. How can this be solved and what causes this? Does it have something to do that the channel bytes cannot be left empty?

sfe-SparkFro commented 5 months ago

Hi there, apologies for the long response time!

In the example, do you have numChannels set to the default of 1, or have you changed it to 512?

The current implementation of this library requires the host to send all numChannels in a single burst, partial transmissions aren't supported. This is to help improve synchronization, and is implemented in this check here:

https://github.com/sparkfun/SparkFunDMX/blob/df287d9ff83fc5ac5819e79a09a54274d4649784/src/SparkFunDMX.cpp#L133-L134

maxroseGIT commented 4 months ago

In the example, do you have numChannels set to the default of 1, or have you changed it to 512?

Does that mean one has to simply set numChannelsto 512 in both example code Example1-DMXOutput and Example2-DMXInput ?

When I did that on two DMX shields with ESP32 boards, the DMX transmission was not received on the shield with Example2-DMXInput code. (see my issue here.

Maybe a few more code examples that work with numChannels = 512, the full DMX channel range, should be added to the library repository ?

This may clarify how the library works when using the DMX shield in an environment with many lamps, were professional DMX gear is used to control the DMX shield and all other lamps in the DMX chain...

patrick-smael commented 4 months ago

@sfe-SparkFro I had set the numChannels to 512 but it did not read it also with this setup.