You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this library to communicate with LED dimmers that accept DMX input (s1-dr dimmers).
The dimmer consists of 2 channels, where the LED light bulb is on channel1.
Using a WT32-ETH01 board (ESP32 board with builtin ethernet) and a MAX485 TTL to RS485 Converter Module, I can send commands to the dimmer.
However, there seems to be a delay (~0.5s - 1s) between the serial.println showing it has turned on the light, and the dimmer turning on the light. The sketch simply switches the light on and off in a loop (ON - wait 1s - OFF - wait 1s).
I am using a modified version of the Arduino_DMXWrite.ino sketch.
I can see the loop runs much faster, as the 'Serial.println("dmx_send_num OK")' and ' Serial.println("dmx_wait_sent OK")' are written to the serial output multiple times per second.
I cannot find any 'soft start' or some kind of delay parameter on the dimmer.
I also terminated the bus with a 120ohm resistor.
Any ideas on why this might be?
bool on = false;
void loop() {
/* Get the current time since boot in milliseconds so that we can find out how
long it has been since we last updated data and printed to the Serial
Monitor. */
unsigned long now = millis();
if (now - lastUpdate >= 1000) {
/* Turn the LED light bulb ON and OFF every 1 second on DMX channel 1. */
if (on == false){
data[1] = 0xFF;
dmx_write(dmxPort, data, DMX_PACKET_SIZE);
Serial.println("LED ON");
on = true;
} else {
data[1] = 0x00;
dmx_write(dmxPort, data, DMX_PACKET_SIZE);
Serial.println("LED OFF");
on = false;
}
}
/* Now we can transmit the DMX packet! */
dmx_send_num(dmxPort, DMX_PACKET_SIZE);
Serial.println("dmx_send_num OK")
/* We can do some other work here if we want. */
/* If we have no more work to do, we will wait until we are done sending our
DMX packet. */
dmx_wait_sent(dmxPort, DMX_TIMEOUT_TICK);
Serial.println("dmx_wait_sent OK")
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am using this library to communicate with LED dimmers that accept DMX input (s1-dr dimmers).
The dimmer consists of 2 channels, where the LED light bulb is on channel1.
Using a WT32-ETH01 board (ESP32 board with builtin ethernet) and a MAX485 TTL to RS485 Converter Module, I can send commands to the dimmer.
However, there seems to be a delay (~0.5s - 1s) between the serial.println showing it has turned on the light, and the dimmer turning on the light. The sketch simply switches the light on and off in a loop (ON - wait 1s - OFF - wait 1s).
I am using a modified version of the Arduino_DMXWrite.ino sketch.
I can see the loop runs much faster, as the 'Serial.println("dmx_send_num OK")' and ' Serial.println("dmx_wait_sent OK")' are written to the serial output multiple times per second.
I cannot find any 'soft start' or some kind of delay parameter on the dimmer.
I also terminated the bus with a 120ohm resistor.
Any ideas on why this might be?
Beta Was this translation helpful? Give feedback.
All reactions