DMX transmitting at a low FPS

I’m getting about 8fps sending a few channels of DMX on an Uno R3.
Any idea why it’s slow or how it can be sped up?

#include <DmxSimple.h>

void setup() {
  DmxSimple.usePin(3); // using digital pin 3 for DMX output

  /* Set up DMX to use Serial0 (the same one that goes to USB on
Arduino UNO and Pro Micro)
     This homemade shield occupies pins 0, 1 (Serial0 - RX, TX) and
pin 4 (for RS485 direction)
     Note: DMX channel set to 512 but you can set to your max required channel
  */
  DmxSimple.maxChannel(512);
  randomSeed(analogRead(0));
}

void loop() {
  for (int ch = 93; ch <= 103; ch++)
  {
    int rand_val = random(0, 256);
    DmxSimple.write(ch, rand_val);
  }
  delay(2); // changed from 41.7 (24fps)
}

Have you tried it without the random number generator? I dont know how the Uno R3 handles the random numbers, so i would suggest you could try it with an integer counting from 0 to 255 and send this.

If that doesn't work, then you can try a different dmx library

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.