Avatar for allObjects

allObjects

Member since Jul 2014 • Last active Dec 2021

Espruino makes IoT as easy as 123!

Most recent activity

  • in Bangle.js
    Avatar for allObjects

    @Gordon, in deed, the link http://forum.espruino.com/huddles/323394­5/#comment16299640 shows. a Nor permitted page... (What is atypical of the url is the huddles thing I never have seen before... A regular post link has this format http://forum.espruino.com/comments/16279­955/

  • in JavaScript
    Avatar for allObjects

    Mark_M

    this is an alternative of 'wrapping' - .bind() :

    const O = {
      a:"", b:0,
      m : function(){
        this.a = this.a + "*";
        this.b = this.b + 1;
        print(this.a," - ", this.b);
      }
    };
    var O_M = O.m.bind(O); // binding O as context for 'this' in function / method m
                          // returns a new function with the right context set of this for O.
    
    setInterval(O_M,1000);
    

    For Function.prototype.bind() see https://developer.mozilla.org/en-US/docs­/Web/JavaScript/Reference/Global_objects­/Function/bind (and take also a look at the referenced .apply(...) ).

    Btw, in JS same upper/lower/camel-casing as Java is useful. Constructor functions - like Classes in Java (and other 'like-minded' languages) - have an uppercase initial.

  • in Bangle.js
    Avatar for allObjects

    Could it be that some electro smog is messing with the GPS receiver? I know: it is far fetched, but looking at this setup could very well cause interferences? I'm sure the table has conducting and ferro magnetic components and the unshielded(?) extension cord reel messes with the/creates electro magnetic waves (know that form HAMming - I hope not a magnetic loop antenna like setting). Even though the power goes in and out the wheel same way which usually 'compensates' effects, one never knows until measured. I remember from construction of the metas tower cupola, nothing conducting or magnetic was used in order to get most unbiased environmental measurements in there. That was of course decades ago... :-; http://www.metas.ch - pic attached. ( @user137174, I'm enjoying your gardening...)

  • in Porting to new Devices
    Avatar for allObjects

    @jeffmer,

    like that very much (post #3 - missed it while in 'forum's display time window'):

    I did not use jswrap_ bangle.c as I found it easier to develop drivers in Espruino.

    Why? I't is core to Espruino.

    With faster and even lower power hardware (and enough memory), the next step may for many things be left out completely:

    I intended to put these into C afterwards but the Espruino driver performance seemed quite useable so I did not bother.

    Moving to layout, I see now the same challenges as with the hardware: the abstract / common parts can be integrated where the very specific ones need their own implementation. I had suggested a while ago to have layout eco system to have the ability to 'branch out' because scaling is not a complete solution. In this case of a rectangular vs a square display, it would be nice to have the ability of unique layouts. I understand @Gordon 's reasoning to not get there, because it is not only not in his (current) set of hardware options, but also: Who is willing to build these things in the first place while having only one particular hardware, and who will update / complement the existing applications, etc. Longterm, I though see suitable source structure and build and runtime infrastructure to come to be, since also @Gordon has to respond to the hardware evolution - as he did for his own boards.

  • in Bangle.js
    Avatar for allObjects

    @jgw,

    the fist char is used to cut out chars before the first char you actually want to provide and 'cut out /safe the space' for the chars before within a 'regular' / ASCII char set, and then only provide 10 chars, for example for numeric or other special font...

    As many other Espruino uniques, resources / frugality - and still make it - are guide for design and implementation.

    I know from (very long time) past that some systems did chose the 2nd 16 chars for all the special chard, such as Umlaute and accents, because it was still 7-bit world, and still leave the basic control chars alone.

  • in General
    Avatar for allObjects

    Instead of giving the pin another tech name, @user135646 you can give it a logical name and leave it in the 'settings'/ start of your app code. This will make you code even more readable (and gets you out of any conflict that may arise by the D# naming).

  • in Bangle.js
    Avatar for allObjects

    I like to see that more and more runtime / late bound reusable infrastructure / utility components come to be to have just the app specifics using app foot print. Espruino eco system morphs into a full fledged, multi layered execution environment.

  • in General
    Avatar for allObjects

    @user135646, with resources so sparse that even minimal debug info is a resource issue, exact (error) location detection / referencing is a challenge. With JS in browser (nodejs) world we (can) have separate map files that help to figure where things go belly up. Many things in Espruino are the way they are because of intentionally accepted resource constraints.

    Last but not least for that reason I use cross build techniques / build my own cross development environment where I have plenty of resources and tool support to 'get my (code) ducks in a row', and then move the pieces into the Espruino context. If I can do that using the modules folder the better and easier is the transition: develop emulating in cross environment, upload from same resources location ont Espruino board without any transmission in between.

  • in Porting to new Devices
    Avatar for allObjects

    @fanoush, Ic. Concluding from your statement

    should work on any board

    I gave the debugger a bit too much Espruino credit... ;_)

  • in Porting to new Devices
    Avatar for allObjects

    @Robin, for me, there are really two types of debugging:

    • The high level debugging that Espruino provides - using the Espruino IDE built-in debugger which knows all about Espruino, it's genuine Espruino boards, their setup, etc. This debugger is a peer to the Espruino interpreter on the board.
    • The low level debugging thru the SWDIO - using what ever tool supports that with the knowledge of the hardware in it basic / native form, which knows zip about Espruino.

    In order to make the first one work for other - non-Espruino boards - I assume it has to be modified to do what is required for those boards.. For me, changing the board descriptor seems not to be enough. There are other things that require modification (or would need generalization with configuration, which would bloat not only Espruino, but also the busy-work for @Gorden (and as you know, busy work provides not only no gain - and is also not (enough) a catalytic... it just cuts into the actual gain to the point where all becomes a loss...).

    PS: @Robin, I guess I'm not providing any new insight to you in this post... :\ ...

Actions