You are reading a single comment by @unknowndomain and its replies. Click here to read the full conversation.
  • After a bit further experimentation I was able to so far verify the data works fine all the way up to channel 36 which is as far as I can go...

    This is an amazing result... I didn't think it would work, let alone be this easy, next I need to wrap it up in a more user friendly way, however I couldn't resist tying it into the three LEDs on the board for a test...

    https://www.youtube.com/watch?v=29v4xd3U­CLA

    Code:

    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 ) {
      analogWrite( LED1, data[1]/256, { forceSoft: true } );
      analogWrite( LED2, data[2]/256, { forceSoft: true } );
      analogWrite( LED3, data[3]/256, { forceSoft: true } );
    //  console.log( "1: " + data[1] + " 2: " + data[2] + " 3: " + data[3] + " 4: " + data[4] + " 5: " + data[5] + " 6: " +  data[6] );
    //  console.log( "7: " +  data[7] + " 8: " +  data[8] + " 9: " +  data[9] + " 10: " +  data[10] + " 11: " +  data[11] + " 12: " +  data[12] );
    //  console.log( "13: " +  data[13] + " 14: " +  data[14] + " 15: " +  data[15] + " 16: " +  data[16] + " 17: " +  data[17] + " 18: " +  data[18] );
    //  console.log( "19: " +  data[19] + " 20: " +  data[20] + " 21: " +  data[21] + " 22: " +  data[22] + " 23: " +  data[23] + " 24: " +  data[24] );
    //  console.log( "25: " +  data[25] + " 26: " +  data[26] + " 27: " +  data[27] + " 28: " +  data[28] + " 29: " +  data[29] + " 30: " +  data[30] );
    //  console.log( "31: " +  data[31] + " 32: " +  data[32] + " 33: " +  data[33] + " 34: " +  data[34] + " 35: " +  data[35] + " 36: " +  data[36] );
    }
    
About