I am using a Teensy 3.1 sending DMX data on TX2(pin10) to a MAX481 connected to a series of DMX RGB pixels. (Teensy3.1 pin 10 -> Max481 -> Pixels with 120 ohm resistor between differential signals)
I am experiencing two issues:
1. I could only control the first 128 channels. I resolved this by commenting out the RAMEND check in the DmxSimple.h file and forcing it to assume 512 channels. I assume there is a cleaner way to do this.
2. Periodically a DmxSimple.write command seems to either be missed, or be delayed. I am experiencing random flashes of other colors. My actual sketch is much more complicated than this, but I broke it down to the simplest sketch where the issue is present for posting here. The more pixels I add the more prevalent the issue. My actual sketch is a series of chases, and the issue is very prevalent.
The below sketch simple alternates between all channels on and all off.
Note: i just ran the identical sketch on an UNO and it does occur, but much less frequently.
I'm sure this is a DmxSimple issue but hoping someone here has some experience with it and can suggest a way to minimize this effect.
Thanks!
Dave
I've posted a video at: http://vimeo.com/109394980
note in the video when you go frame by frame it seems that the issue occurs when setting the channels to 0 as it appears to be as they are going off.
I am experiencing two issues:
1. I could only control the first 128 channels. I resolved this by commenting out the RAMEND check in the DmxSimple.h file and forcing it to assume 512 channels. I assume there is a cleaner way to do this.
2. Periodically a DmxSimple.write command seems to either be missed, or be delayed. I am experiencing random flashes of other colors. My actual sketch is much more complicated than this, but I broke it down to the simplest sketch where the issue is present for posting here. The more pixels I add the more prevalent the issue. My actual sketch is a series of chases, and the issue is very prevalent.
The below sketch simple alternates between all channels on and all off.
Note: i just ran the identical sketch on an UNO and it does occur, but much less frequently.
I'm sure this is a DmxSimple issue but hoping someone here has some experience with it and can suggest a way to minimize this effect.
Thanks!
Dave
I've posted a video at: http://vimeo.com/109394980
note in the video when you go frame by frame it seems that the issue occurs when setting the channels to 0 as it appears to be as they are going off.
Code:
#include <DmxSimple.h>
int univ_1_pin=10; //Teensy3.1 TX2 pin
int speed=600; //delay between loops
int maxchannel=252;
void setup() {
int j;
//blank all pixels before starting
DmxSimple.usePin(univ_1_pin); //set output to universe 1
DmxSimple.maxChannel(maxchannel);
for (j=1; j<=maxchannel; j++) {
DmxSimple.write(j, 0); //write the values out to the pixels
}
}
void loop() {
int i;
// turn all pixels off
for (i=1; i<=maxchannel; i++) {
DmxSimple.write(i, 0);
}
delay(speed); //modify speed variable to change how fast the sequence runs
// turn all pixels on
for (i=1; i<=maxchannel; i++) {
DmxSimple.write(i, 10);
}
delay(speed); //modify speed variable to change how fast the sequence runs
}