Bangle.js 2 Emulator

Posted on
  • The Bangle.js 2 emulator is now live.

    Please bear in mind this is early, basic software, running in an emulator, so it's not a good indication of what the watch will be like to use.

    Just click on this link then choose 'Bangle.js 2'.

    The link will upload code which will load a default (basic) firmware on the emulated watch.

    Usage instructions:

    • Press the button on the right to move from the clock to the launcher
    • click and drag on the launcher to move, and use click on an item to select
    • In the small menus, drag up and down to change the highlighted line, then click anywhere to select
    • Long-press to return home does not currently work - you need to type load() into the left-hand side of the IDE to do that.

    You can try out apps from the App Store too using https://banglejs.com/apps/#b2 and clicking on the emulator icon where available - see the image below. Right now you need to search using the 'b2' keyword to find apps that are Bangle.js 2 compatible.


    1 Attachment

    • Screenshot at 2021-10-05 14-52-50.png
  • Just click on this link

    worked fine but needed to reload the page as it didn't ask and started bangle 1 emulator for me at first

  • That doesn't work at all. I get popup "Searching... No ports found" and I don't see any place there to choose 'Bangle.js 2'. Clicking the icon in App Store doesn't work either.

    (Firefox 78.14.0esr ; Debian 10)

  • Ahh, sorry. It could be an issue with Firefox compatibility - maybe try Chrome?

    Generally the IDE doesn't get tested much because you need something Chromium based for Web Bluetooth or Web Serial to work.

  • ok, that seems to be the issue - Chromium works OK. (I don't have Chrome installed currently.)

  • Neat. My app will be ported to v2 tonight ...

  • Great! @malaire if you try now on Firefox (you'll have to refresh) it should work ok now.

  • Excellent... I know the dust will settle.

    ...and the (fastest coded, stoppable) blink works right out of the box (in blue - EDIT: for now, see @NebbishHacker 's post #13):

    Paste into console:

    var b,bId=setInterval(()=>LED.write(b=!b),50­0)
    

    Stop it with:

    clearInterval(bId)
    
  • Yes, it works now in Firefox. :)

    Is it the intention that in menus clicking anywhere on screen selects the currently highlighted item, not the clicked item? That's really counter-intuitive.

    EDIT: oh, I just noticed that the first post does say "click anywhere".

  • Is it the intention that in menus clicking anywhere on screen selects the currently highlighted item, not the clicked item? That's really counter-intuitive.

    Yes, there's a thread on it in the forum, but it seems like it's either that or you go for massive menu items with maybe 3 of them on-screen at a time so you can easily touch them with your finger. It's actually something that can be changed globally just by installing an app though, so it's easy enough to flip between and experiment.

  • How about always keeping the highlight stationary and moving the items (i.e. reverse scrolling direction)?

  • Great! It now works in Firefox. Although, I did have to load Chrome first. I'm assuming that even though it is working now in Firefox, I still need to keep Chrome on my machine, since it needs the Web Serial and Web Bluetooth libs?

    Anyway, thanks for getting it working on Firefox.

  • Red and blue appear to be swapped in the Bangle.js 2 emulator. g.setColor("#f00") results in blue when it should be red, and vice versa.

  • I still need to keep Chrome on my machine, since it needs the Web Serial and Web Bluetooth libs?

    Ideally yes, if you want to actually talk to the device when it arrives. You should be able to use https://www.espruino.com/ide/relay/ from firefox though

    How about always keeping the highlight stationary and moving the items

    Could do... What does everyone think? Does that noticably with the slight disconnect from not needing to click directly on the text item? In the middle of long menus (like Settings) this does kind of happen already so you can get a rough idea what it feels like.

    Red and blue appear to be swapped in the Bangle.js 2 emulator

    Thanks - not sure what happened- I actually swapped them once already but I guess I got confused. Should be fixed if you refresh now :)

  • How does the emulator compare in speed with the watch? (I know, any comparison will be wildly approximate.)

  • There's no throttling so it depends on the speed of the PC, but at least for me I feel like the emulator is faster for most things

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

Bangle.js 2 Emulator

Posted by Avatar for Gordon @Gordon

Actions