-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Description
Hello,
I'm using the library as a DMX receiver from an ENTTEC USB PRO.
It kind of works, but I get random values time to time, even when the values I'm sending stay stable without modification.
The relevant code I'm using:
void setup()
{
WiFiOff();
dmxA.begin();
dmxA.dmxIn(true);
dmxA.setInputCallback(dmxIn);
delay(1000);
} // setup
void dmxIn(uint16_t num) {
// Double buffer switch
//byte* tmp = dataIn;
dataIn = dmxA.getChans();
//dmxA.setBuffer(tmp);
newDmxIn = true;
}
void loop() {
//dmxA.handler();
if (newDmxIn)
{
analogWrite(PIN_LASER, dataIn[1]);
newDmxIn = false;
lastDMX = millis();
singleGreen();
}
if (millis() - lastDMX > 2000)
singleRed();
delay(1);
} // loop
I get the laser glitching even when the value of the channel stays to 255.
If I put all the channels at the same value, it seems to get a bit more stable.
Any thoughts what could I test?
Thanks!
Antonio.
Metadata
Metadata
Assignees
Labels
No labels