Hi Erics
Thank you for your reply.
What I do know is that, when working with linear movement it’s easy to do the calculation with 16bit, like this: coarse value = 65.536 / 256 and fine value = 65.536 % 256 and that is working fine, using 16 bit combining two channels. It also works well because when the movement is linear there will also be one full fine movement (0-255) before coarse increments with 1.
For doing movement its better (one reason is the weight of the lamp) to use a sine-wave to generate the movement values, instead of linear-movement (sawtooth) so I use sine and cosine to calculate values from -1 to 1 (using degree 0-360) and calculate the DMX by this: dmxvalue = (sine * 127) + 127 and that is giving me a fine sine-curve, expressed in DMX -values ranging from 0-255.
So, I can do the movement (using sine and cosine) for the coarse channel, but I would like to use the fine channel also, so I can get smooth movements even at low speeds. My problem is that sometimes the coarse DMX -values are like this: 128, 128, 129, 129, 130 with the same DMX -value in a row and the means no fine-movements between those values. Not sure if I’m on the right approach here?
I'm still in the early days here, but when thinking about it, I don't think the "fine" should have the form as a sine-wave, I mean, the "fine" will (if using sine) go very, very, fast, both up and down, and that will mess things up if the "coarse" is still going "up". I guess the correct is that the "fine" will always have the sawtooth-shape -> sawtooth from zero to max when coarse is going up, and sawtooth from max to zero when coarse is going down. Does that makes sense?
How will you do the math/programming when calculating coarse and fine DMX-values for at sine/cosine movement?
Kind Regards