ESP32 DMX to LED Shield always returns dmx.read(Channel) of 0

I’m having problems with my Sparkfun DMX Shield - but also problems with posting to the forum.

dmx.read(Channel) always reports a 0.

I see others posting to the project’s GitHub repo have encountered the same, but there’s no response there.

Is anyone here aware of problems with the basic DMX rx sample?

Thanks.

I’m generating DMX using an ENTTEC DMX USB Pro, driven by the Pro Manager app. I don’t have a DMX-enabled fixture with me to confirm it’s working OK, however this setup has worked for me in the past.

Here’s the basic code I’m running with, to no avail. Every pass through the loop returns a DMX value of 0.

#include <SparkFunDMX.h>

SparkFunDMX dmx;

//Channel Definitions
#define TOTAL_CHANNELS 512

int DmxChannel = 1;
uint8_t currentValue = 0;
uint8_t lastValue = 999;

void setup()
{
  dmx.initRead(TOTAL_CHANNELS);           // initialization for complete bus
  Serial.begin(115200);
}

void loop()
{
  dmx.update();
  currentValue = dmx.read(DmxChannel);
if (lastValue != currentValue)
  {
    Serial.println("DMX Channel = " + String(DmxChannel) + ", Pattern = " + String(currentValue));
    lastValue = currentValue;
  }
}

Are there any other libraries I need to have installed? I went looking for an ESP32 folder tree under ProgramFiles(x86)\Arduino\Hardware in search of HardwareSerial.h, but I only have Arduino, Teensy & Tools. Is that to be expected?

The project’s examples drive LEDs and a Servo, so I’ve NOT installed those libraries, only the SparkFunDMX Arduino library. Is there something underlying in them that I need and am missing?

Thanks for any help.

  • Greig.

Hi Greig,

I ran your code also using ENTTEC DMX USB PRO and the Pro Manager App. I confirmed that it is working well to control a Tomshine Moving head. Here is the output with the fader at 0 for channel 1:

DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 6
DMX Channel = 1, Pattern = 128
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 255
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 128
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 128
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 128
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 128
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 255
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192

Here is the output with the fader at 127:

DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 128
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 128
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192

and with the fader at 255:

DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 128
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 128
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 48
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 96
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 192
DMX Channel = 1, Pattern = 1
DMX Channel = 1, Pattern = 0
DMX Channel = 1, Pattern = 96

Not the same trouble of always returning 0, but not particularly useful values either. It would be nice for dmx.read(DmxChannel); to return the value that weI set the Ch1 fader to.

I am having a similar issue not reading consistent values on a single DMX channel. Was there any resolution, or am I missing something?

Greg