You are reading a single comment by @DBovey and its replies. Click here to read the full conversation.
  • And after playing with the badge extensively, it doesn't execute the code official badge.js code any more. Although some variables are set, see left-hand window log below.
    The code is at:
    https://github.com/dbovey/espruino/blob/­master/Badge_simple.js
    It is just the badge.js code with minor modifications.
    Running onInit()...
    Uncaught SyntaxError: Got ?[255] expected EOF
    at line 1 col 4808
    ...?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255]...

                                                                                                                                                                                                                                                                                                                                                                                                     ^
    

    at line 1 col 1
    ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255] ?[255]...

                                                                                                                                                                                                                                                                                                                                                                       ^
    

    in function called from system

    NAME
    =[
    "Hello",
    "World"
    ]
    cityscape
    ={ width: 128, height: 16, bpp: 1,
    buffer: new Uint8Array([0, 0, 0, 0, 0, ... 255, 255, 255, 255, 255]).buffer
    }

  • Sat 2019.10.05

    @DBovey would you mind posting the link to the original official badge.js code please so that we may follow along with that source which originally worked.

    ref Writing an effective forum post


    What are the results of process.env

    When viewing your uploaded code in the WebIDE, are there any red error indicators on the Right-Hand side editor window? It appears the code file may have a typo or missing trailing line of code terminator.



    Could this - Cube Badge be the source?

    Post #1 comment L56 indicates onInit() called at start up. There isn't a reference to that function. Would it make more sense to manually save() after all edits have been performed, and change L71 to call onInit()?

  • Just to clarify, you have this badge, right?

    First thing to try would be to reset(1) to remove everything from flash, possibly you had too much in memory, or remains of a previous experiment mess up something. And do some basic sanity check - do the basics work?

    Or try the Returning to Standard instructions on the docs page.

About

Avatar for DBovey @DBovey started