Avatar for coat

coat

Member since Oct 2021 • Last active Dec 2021
  • 4 conversations
  • 14 comments

Most recent activity

  • in Other Boards
    Avatar for coat

    No way.
    I tried 2v10 and 2v10.142 but nothing changed.
    Still have the error

    Uncaught Error: Not connected!
     at line 1 col 104
    ...0,0,0],function(){a&&a()})})
                                  ^
    in function "tap" called from line 8 col 25
          kb.tap(kb.KEY.A, 0);
                            ^
    in function called from system
    

    Anyway, the code is working, as before, with no problem

  • in Other Boards
    Avatar for coat

    I mean the espruino firmware, you previously had to install some espruino_XXX_microbit2.hex file from https://www.espruino.com/Download

    Oh yes! I've done this previously.

    Current version is shown in bottom right corner when you connect via WebIDE or via typing process.env or process.version on left side

    I read 2v10.113
    In download page I see espruino_2v10_microbit2.hex and espruino_2v10.142_microbit2.hex as Cutting Edge build.

    Is it possible that I have installed the previous Cutting Edge Version (113) instead of 2V10?

  • in Other Boards
    Avatar for coat

    Do you mean the firmware of the micro:bit?
    I think it's update. How can I check?

  • in Other Boards
    Avatar for coat

    Hi - you need to send multiple keys like is shown in the example you linked

    Hi @Gordon and thank you very much.
    I saw the example, but I was looking for another solution because a keystroke should be sent in a part of the code and another in a different part.
    I imagined that was a problem of time, as you confirmed.
    So I'll try with some other workaround in my code

    oh, ok, sorry, was thinking v1 due to uart overflow in the other thread http://forum.espruino.com/conversations/­369059/ but now I see yet another thread created by @coat with V2 in name

    @fanoush yes, mine is micro:bit v2. I was not precise in my request, I'm sorry and thank you for your help. I really don't know what UART_OVERFLOW error wants from me

    I'm still receiving also this error (or similar) when finally I flash the code

    Uncaught Error: Not connected!
     at line 1 col 104
    ...0,0,0],function(){a&&a()})})
                                  ^
    in function "tap" called from line 48 col 36
                      kb.tap(kb.KEY.G,0);
                                       ^
    

    But again I don't know what it means

    • 5 comments
    • 1,589 views
  • in Other Boards
    Avatar for coat

    I was not precise fanoush, sorry.
    I am already using Micro:bit v2.
    The code works correctly, but often I need to flash it many times until the error doesn't occur.

  • in Other Boards
    Avatar for coat

    Hi!
    I noticed that, using the example code of Bluetooth LE HID Keyboards (here), if i write

    kb.tap(kb.KEY.A,0);
    kb.tap(kb.KEY.N,0);
    

    the micro:bit send only the first letter (a).

    Is there a workaround or somthing to do to allow the board to send more letters?

    Thanks!

  • in Other Boards
    Avatar for coat

    Hi fanoush.
    I tried your suggestion but UART_OVERFLOW error is still there :-(

  • in Other Boards
    Avatar for coat

    Hi again!
    I'm trying to make a BLE keyboard with micro:bit to send a keystroke when it is tilted to the right, left, front, back.
    This is my code (I've not finish to write all)

    var kb = require("ble_hid_keyboard");
    NRF.setServices(undefined, { hid : kb.report });
    
    var min = -400;
    var max = 400;
    
    
      var x = Microbit.accel().x*1000;
      var y = Microbit.accel().y*1000;
      var z = Microbit.accel().z*1000;
    
    if (x > min && x < max && (y > min && y < max && z < (-800))){
      kb.tap(kb.KEY.A);
    } else {
        if (x > min && x < max && (y > min && y < max && z > 800)) {
          kb.tap(kb.KEY.F);
        } else {
            if (x > min && x < max && (z > min && z < max && y > 800)) {
                kb.tap(kb.KEY.D);
            } else {
                if (x > min && x < max && (z > min && z < max && y < (-800))) {
                    kb.tap(kb.KEY.E);
                } else {
                    if (y > min && y < max && (z > min && z < max && x > 800)) {
                        kb.tap(kb.KEY.B);
                    } else {
                        if (y > min && y < max && (z > min && z < max && x < (-800))) 
                            kb.tap(kb.KEY.C);
                    }
                }
            }
        }
    }
    

    I'm using the example of BLE Keyboard here and I receive this error

    Uncaught TypeError: Expecting a number or something iterable, got undefined
     at line 1 col 104
    ...0,0,0],function(){a&&a()})})
                                  ^
    in function "tap" called from line 16 col 18
      kb.tap(kb.KEY.A);
                     ^
    

    or this one

    >New interpreter error: UART_OVERFLOW
    >Uncaught ReferenceError: "requirerage" is not defined
     at line 2 col 1
    requirerage").write(".bootcde","85,\nPAD­_MINUS:86,PAD_PLUS:8...
    ^
    Uncaught SyntaxError: Got '}' expected ','
     at line 11 col 5
        }
        ^
    

    If I make a test with just

    print("A");
    

    instead of

    kb.tap(kb.KEY.A);
    

    I've no error and the code works as I want.

    What it can be?

Actions