Trouble with Pixl+mukti #3090
Replies: 6 comments
-
|
Posted at 2019-10-05 by Robin 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. What are the results of 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](https://www.espruino.com/Pixl.js+Cube+Badge) be the source? Post #1 comment L56 indicates |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-10-05 by AkosLukacs Just to clarify, you have this badge, right? First thing to try would be to Or try the Returning to Standard instructions on the docs page. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-10-06 by DBovey Sorry @AkosLukacs for my incomplete post :-( > 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. > Or try the Returning to Standard instructions on the docs page. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-10-06 by DBovey > @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. @robin I took badge.js from git, downloaded to my pc, changed NAME variable and recopied to https://github.com/dbovey/espruino/blob/master/Badge_original.js but cannot for the universe's sake find where it was originally on git or somewhere else (it was between 2 and 3AM)... Could this - Cube Badge be the source?
I opened the badge_original with notepad++ and I cannot see the issue at function draw() at L41 of the code. the issue is exactly the same in my badge_simple.js which has just a couple of graphical changes to center the displayed NAME. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-10-06 by DBovey Update: Problem partially solved! The "save" code at the end was the culprit, I commented it out and it seems to store the code on flash. Does the IDE have a setting for that? |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-10-07 by @gfwilliams
If you look under Settings -> Communications -> save on send then you can choose how code is sent to the device.
That was part of the idea of the badge code so that other people can't hijack your badge :) The code that does it is down the bottom: https://github.com/dbovey/espruino/blob/master/Badge_simple.js#L60 Basically if you hold down a button for the first few seconds after boot (or if you're already connected) then the connection will stay up. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-10-05 by DBovey
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
Beta Was this translation helpful? Give feedback.
All reactions