• serial break? I'm not quite sure I understand...

    I guess it's possible that the micro:bit has the nRF51's reset wire connected to a COM port RTS/CTS wire (or similar), a bit like Arduinos?

    Is there another way to "force" the device to send the usual prompt when port is opened?

    You could send "\x03\x10reset()\n"? The issue (I believe) is that on 'normal' USB Espruino boards the USB goes right to the microcontroller running Espruino, so it can keep the serial data buffered until it sees a connection.

    On micro:bit it's basically the nRF51 running Espruino connected to a TTL-USB converter - so Espruino sends out its 'hello' message when it boots, but that's way before a USB connection to the PC is established so it probably gets lost.

    the prompt I get contains the "Uncaught InternalError: I2C Write Error 33281"

    Argh, yeah. That's because micro:bit actually changed their design a while back - new micro:bits have a totally different magnetometer, and the firmware is expecting the old one.

    It's something that needs to be fixed in the Espruino firmware, but sadly I don't really get any positive feedback about the micro:bit's use with Espruino, so fixing it has been super low priority.

    I could be wrong but I think that everything still works ok, just not the magnetometer?

  • serial break? I'm not quite sure I understand...

    In JavaScript, I call port.setSignals({ brk: true }); which sends the break signal.

    You could send "\x03\x10reset()\n"? The issue (I believe) is that on 'normal' USB Espruino boards the USB goes right to the microcontroller running Espruino, so it can keep the serial data buffered until it sees a connection.

    I've tried this without luck sadly.

    I could be wrong but I think that everything still works ok, just not the magnetometer?

    Indeed compass() and acceleration() don't work.

    One more and last thing
    I've noticed 2v06 (c) 2019 G.Williams in the prompt message was sometimes missing the ending \n. Basically ending with \r, instead of \r\n. Is this a known issue?

About

Avatar for François @François started