• I haven't used Espruino (or my micro:bit) for a while, I downloaded the latest (1v90) for the microbit and flashed it, however save(); either isnt working or has severely changed since 1v86. @Gordon helped me with this before.

    This is the code i have:

    function m() {
      show(0b1);
    }
    function onInit(){
      m();
    }
    save();
    

    on 1v86 this is the output:

    on 1v90 this is the output:

    2 Things
    1) I don't know why on 1v90 it thinks its 4200 bytes and on 1v86 it is just 3720...
    2) If i power my microbit with 1v86 after running that code it displays the first led (correct) on 1v90, nothing happens.

    Quick question about bluetooth / nRF, I noticed in changelog it has been changed, however I am unsure of how to change the broadcast name from "ESPRUINO Microbit" it just says

    options is an object, which can contain:

    {
    name: "Hello" // The name of the device
    showName: true/false // include full name, or nothing
    discoverable: true/false // general discoverable, or limited - default is limited
    interval: 600 // Advertising interval in msec, between 20 and 10000
    }

    And i dont really understand it..

  • Hmm. Looks like it's because Espruino's code didn't know about the polarity of the buttons (they read 1 when off and 0 when on). If you hold down BTN1 while resetting it'll work - I'll get that fixed for the 1v91 release.

    You should be able to do NRF.setAdvertising({},{name:"YourName"})­; for advertsing I think

  • Yep, holding BTN1 works.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

BBC micro:bit save(); problems, again. and a question about BLE

Posted by Avatar for bennyfa @bennyfa

Actions