You are reading a single comment by @unknowndomain and its replies. Click here to read the full conversation.
  • With this code it kind of works...

    var dmx = new Uint8Array( 512 );
    var dmxIdx = 0;
    
    Serial2.setup( 250000 );
    
    Serial2.on( 'data', function( d ) {
      dmx.set( d, dmxIdx );
      dmxIdx += d.length;
    } );
    
    setWatch( function() {
      dmxFrame( dmx );
      dmxIdx = 0;
    }, B8, { repeat: true, edge: 'falling' } );
    
    function dmxFrame( data ) {
      console.log( "1: " + data[1] + " 2: " + data[2] + " 3: " + data[3] + " 4: " + data[4] + " 5: " + data[5] + " 6: " +  data[6] );
    }
    

    However the issue is that bytes later on seem to become corrupt if the values before it are low... I looked at the signal out of the DMX shield and it looks like the signal was jumping around a bit only when the circuit with the diode, capacitor and resistor were connected.

    My theory was that perhaps there was some electricity flowing back through the resistor or because it's a general purpose diode it is some how not quick enough. I remember that zener diode is faster or something.. anyways my electrical knowledge is limited here so I found a little zener and tried it and it's working great.

    It appears to be a 1n2268.

    More experimenting to happen...

About