You are reading a single comment by @Raik and its replies. Click here to read the full conversation.
  • So taking the doztime code from github and uploading to the emulator as Bangle2 (or to the Bangle2 itself) I get the following errors:

    Uncaught Error: Function "sleep" not found!
     at line 4 col 45 in .boot0
    if (!NRF.getSecurityStatus().connected) NRF.sleep();
                                                ^
    >
    >Uncaught Error: setLCDMode is unsupported on this device
     at line 1 col 19
    Bangle.setLCDMode();
                      ^
    >Uncaught ReferenceError: "BTN2" is not defined
     at line 1 col 48
    ... Bangle.showLauncher(); }, BTN2, { repeat: false, edge: "fal...
                                  ^
    >Uncaught ReferenceError: "BTN3" is not defined
     at line 1 col 40
    setWatch(function(){ modeWeather(); }, BTN3, {repeat:true});
                                           ^
    >Uncaught ReferenceError: "BTN4" is not defined
     at line 1 col 45
    ...(){ toggleTimeDigits(); }, BTN4, {repeat:true});
                                  ^
    >Uncaught ReferenceError: "BTN5" is not defined
     at line 1 col 45
    ...(){ toggleDateFormat(); }, BTN5, {repeat:true});
    
    

    So NRF and setLCDMode are to be expected because the emulator does not have NRF and the Bangle2 does not support LCD modes.

    And the others are related to the button definitions that are not supported on the Bangle2 either.

    But you could work around with that probably by using above code from Gordon.

    Not sure why you are seeing different errors. Maybe some browser caching issue?

About

Avatar for Raik @Raik started