• Hi @Gordon, just to simplify; I eliminated the second setAdvertising (it was added for debugging) and went back to changing the initial setup. In the following code, when the parameter is set to true, everything works. When it is set to false, the board ceases to advertise. Please try it for yourself...

    The only other thing I'd add is that I'm uploading to flash (save on send = directly to flash).

    Thanks for checking this out.

    //
    //  OSF Between Two Knees lighting effect translator
    //
    
    var count = 0;  // for testing
    var i = 0;
    
    // port definitions
    
    const SCL = D26;
    const SDA = D25;
    const data_ready = D7;
    const DMX_length = 18;
    const DMX_channel = 0x05;
    
    // setup I2C
    I2C1.setup({ scl : SCL, sda: SDA });
    
    // change to "input" for direct CPU connection from "input_pulldown"
    pinMode(data_ready, "input");  // for switch for testing
    
    var DMX_data = new Uint8Array(DMX_length);      // array to store DMX data received
    
    for (i = 0; i < DMX_data.length; i++)
    {
      DMX_data[i] = 0;
    }
    
    //
    // Initialize; set up
    //
    
    NRF.setTxPower(4);         // +4 dBM (maximum)
    NRF.setAdvertising({},{
      name: "PTG",
      interval: 30,
      connectable: false,      // change to false before deployment
      manufacturer: 0x0583,    // Code Blue Communications
      manufacturerData:[DMX_data]
    });
    
About

Avatar for billsalt @billsalt started