You are reading a single comment by @coat and its replies. Click here to read the full conversation.
  • Hi everyone.
    I'm new here and I would learn to program my microbit v2 with espruino.
    So, I've connect my board to Espruino Web IDE. So far so good.
    But when I try the examples here it seems that they doesn't work.

    For example, I have flash on micro:bit this one

    show("1   1\n"+
         "  1  \n"+
         "  1  \n"+
         "1   1\n"+
         " 111 \n");

    but nothing happens.

    Then I have try with the following one

    g = Graphics.createArrayBuffer(5,5,1);
    g.flip = function(){show(this.buffer);};
    var x = 0;
    setInterval(function() {
      if (x>50)x=0;
    }, 100);

    But nothing.

    Instead, when I have try the BLE keyboard example:

    var kb = require("ble_hid_keyboard");
    NRF.setServices(undefined, { hid : });
    function btnPressed() {
      // Send 'a'
      kb.tap(kb.KEY.A, 0, function() {
        // Followed by capital 'A'
        kb.tap(kb.KEY.A, kb.MODIFY.SHIFT);
    // trigger btnPressed whenever the button is pressed
    setWatch(btnPressed, BTN, {edge:"rising",repeat:true,debounce:50})­;

    It worked (but only when I press A button, not B).

    Where am I wrong?

    Thank you for your replies!


Avatar for coat @coat started