You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • when I write ... In WebIDE it doesn't give me any hexadecimal character

    What does it give you? Maybe try running in the left-hand side of the IDE as that prints the result of evaluating an expression.

    You could also use the Linux shell:

    echo "LED.toggle()\n" | od -A n -t x1 | tr -d " "
    

    this writes but the led doesn't turn on.

    That's odd - I did that it worked for me. Are you definitely using the MDBT42Q, with an up to date firmware? I seem to recall that the original firmware didn't have LED2 defined, so the code might have created an error when it was run.

    You could always just do:

    NRF.setServices({
      "35ac0001-18b0-e8b7-3feb-62cec301da00" : {
        "35ac0002-18b0-e8b7-3feb-62cec301da00" : {
          value : [0],
          maxLen : 1,
          writable : true,
          onWrite : function(evt) {
            digitalWrite(LED1, evt.data[0]);
          }
        }
      }
    });
    // and then
     char-write-req 0x0013 01
    

    because we know that the pin LED1 does exist.

About

Avatar for Gordon @Gordon started