moritzruth / node-enttec-open-dmx-usb

💡 A Node.js library for interacting with the Enttec Open DMX USB Interface
MIT License
14 stars 5 forks source link

Can you send the DMX values ​​more precisely? #77

Closed JohnDeereLiebhaber closed 2 years ago

JohnDeereLiebhaber commented 2 years ago

Hello, is it possible to send the DMX values ​​more precisely by that I mean like e.g. device.setChannels({1: 0x129})

Is this possible if so how.

Thanks

moritzruth commented 2 years ago

I’m not sure if I’m understanding your question.

0x129 (= 297) is not a valid DMX value if that’s what you mean. DMX values must be between 0 and 255.

Devices using 16-bit precision usually use two consecutive channels (16 bits = 2 bytes, 1 channel = 1 byte).

JohnDeereLiebhaber commented 2 years ago

ok just how can I turn a moving head up to 129 pan, for example? because it only goes to 0x99 or 0xF

moritzruth commented 2 years ago
  1. 0x00 is

  2. 0xFF is 360°

  3. 255 / 360° = about 0.71

  4. 0.71 * 129° (your example) = 91.59

  5. 91.59 rounded is 92

  6. 92 in hexadecimal notation is 0x5C

JohnDeereLiebhaber commented 2 years ago

ok thank you