Avatar for allObjects


Member since Jul 2014 • Last active Jan 2020

Espruino makes IoT as easy as 123!

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for allObjects


    to give you an idea of PuckJS' Anatomy and its button press experience, take a look at annotated picture below. I 'styled' cross cut - at bottom right - you can see how the button indirectly is pressed: By pressing on the board the button is pressed against the bottom of the case. Therefore, I suggest to create a board / component protective insert to enhance the press experience and make the touch area on the silicon cover more pronounced. Since the board acts like a leverage, best pressing point is at the opposite end of the pivot point / ledge side, and press experience decreases the closer to the pivot point / ledge to become practically impossible close to and over the pivot point / ledge (pure mechanics from physics). Some filed tries with different inserts (and covers) could answer usability. Cover with hard area where pivot point is and soft - with matching insert - where button is located. Of course, if you can go without changing the cover design, that would be great. Inserts should have a small opening where LEDs are or be transparent to keep LEDs useable.

  • in General
    Avatar for allObjects

    ...Have no single message anymore...

    Are they coming back? / Will they be restored?

    I really, really, really hope that the messages will be back! - Have no issue if they Sat or Sun is missing, but deleting all is not exactly what I would look for - I just accepted the fact that once in a while I get a spam massage from a spam user...

  • in Bangle.js
    Avatar for allObjects

    @ Abhinav, I hope you read thru these posts:

    I've gotten myself a micro:bit a while ago and was a bit disappointed what is left to work with because of the even more constraint memory resources... and I second hesitating no second what forum posters comment about the very limited use and timing constraints due to processor having to tend to communication as well (almost like ESP8266). Another thing I noticed is bluetooth version difference... So I would not surprised seing you in deep work waters with it.

  • Avatar for allObjects

    @kierankay, hat's a tough task you take onto you... the way that Arduino works - polling loop - versus Espruino - interrupt driven - puts itself in way of adapting this code. Furthermore, check on the implementation of Promises in Arduino world. Depending what the adafruit libs give you (setting some flags on filtered reception of data and buffer thereof) and availability of a lib or your on implementation of Promises you should be able to lean on the main line and structure of the Espruino code...

  • in Bangle.js
    Avatar for allObjects


    serious breaking change!

    for file typing in storage has to be thought thru before jumping in. I assumed the (app) file name(s) have this information in the prefix... but I'm obviously mistaken.

    I like the 'fix swipe' in emulation: https://github.com/espruino/EspruinoWebI­DE/commit/33808e85d2d1b7306701ce9916c315­18d003e0be

  • in Bangle.js
    Avatar for allObjects

    In most biz apps that have specific (default) extension for data files, a filter is in place to show first those files, but the filter can be muted and all files show. This could be the idea the storage file lister shows (first) just the executables.

  • in General
    Avatar for allObjects

    I need to run the program in very fast speed,...

    @user101931, you have to be a bit more specific about

    the program

    More specific in sense of structure... For example, you have to serve an even very fast: react very quickly - with out delay - and calculate/compose a result very quickly. The next question is: do you want to take advantage of Espruino as a system and how easy it is to use? Speeding up an application is not a linear street: for some things there is no speed up, such as serially communicated. Going fully 'raw - C native - you may squeeze out a lot of power from an algorithm, but communicating the result takes a while and the overhead caused by the simplicity of use / application is only a few %.

    What @Gordon means w/

    it's always possible that the JS surrounding your inline C is slowing it down).

    is the switching between environments - JavaScript calling native/raw/inline C - and then go back out and in again. In JavaScript references are base on lookup where as on incline C / raw, native, references are resolved upfront. In JavaScript memory is dynamically managed by the (Espruino) system where as on incline C / raw, native, memory is application managed. Since JS is dynamic and passes the addresses in calls to (inline) C and they can change between invocations. So make your pick. Enhancing the garbage collected memory mechanism w/ areas to lock down (and allocation at the 'beginning' to not fragment the remaining memory can help curb dynamics. Memory handling and garbage collect is though Espruino specific and different to other implementations as used on other general purpose computer platforms.

    With a smart setup / combination of Espruino (JS) firmware combined w/ raw, native C programming - inline or as firmware extensions w/ own build - you can co really do great.

  • in Tutorials
    Avatar for allObjects

    ...opening curly braces - in line 12 - fell victim to the experience... I like this variable option. Put it on a single line with (could not let go my 'Schnapszahl'):


    I use a similar approach for my debugging, logging:

    • have a variable each for enabling / disabling it, for example lon for log is on
    • a log() that invokes console.log(arguments); to save space
    • invoking on one line `if (lon) log(...); to filter for final load

    In (my) emulation I have an overwrite that logs way much more...

    It is always a good approach to keep code changes the smallest between dev and release... last but not least also to be able to fall back in case debug is needed.

  • in ESP8266
    Avatar for allObjects

    Did you put your code into an the onInit(){...} function or into a function (path) that is called from within onInit(){...} function?

  • in ESP8266
    Avatar for allObjects


    sorry, was obviously not clear in my post - my bad: With complete code I was looking just for the JavaScript source and the description of the process how you uploaded it to the board.

    (I was not expecting the firmware / bin that you custom-build and flashed onto the board).