Avatar for Robin


Member since Jan 2017 • Last active Jan 2021

Most recent activity

  • in Bangle.js
    Avatar for Robin

    Sun 2021.01.10

    For IIS you'd need to calculate when it's over the horizon

    Why not just use the web service provided in the second section of the article referenced in post #1 ? Then it is just a simple JSON parse.

  • in JavaScript
    Avatar for Robin

    Sun 2021.01.10

    Hi @Guillaume_G chew on this for a while

    The issue appears to be L26 with an incorrect parameter list.

    Espruino reference for setColor() function:


    This is a great web site to test Javascript concepts:

    Tutorial and Examples along with a 'TryIt' editor


    This may also be solved using either Arrays or JSON object notation.


    If you wish to stay in base10 then these snippets might be one way

    aryRGB =[
      { "r": 255, "g": 0, "b": 0 },
      { "r": 171, "g": 85, "b": 0 },
      { "r": 171, "g": 171, "b": 0 },
      { "r": 0, "g": 255, "b": 0 },
      { "r": 0, "g": 171, "b": 85 },
      { "r": 0, "g": 0, "b": 255 },
      { "r": 85, "g": 0, "b": 171 },
      { "r": 171, "g": 0, "b": 85 }
        var aryRGB = new Uint8ClampedArray( this.aryColors.length );
        aryRGB = this.aryColors;
        var r = aryRGB[i].r;
        var g = aryRGB[i].g;
        var b = aryRGB[i].b;

    or maybe in hex

    const RGB = {
      AliceBlue  : "F0F8FF",
      AntiqueWhite : "FAEBD7",
      Aqua       : "00FFFF",
      Aquamarine : "7FFFD4",
        . . . 
    // User defined functions required to extract each value
        this.decR = Color.cvrtHexToDec(this.colorR);
        var vals = {};
        vals.r = this.decR;
        vals.g = this.decG;
        vals.b = this.decB;

    and if you get stuck on the gristle, I'll check back in a few hours to get you over the goal post.

  • in General
    Avatar for Robin

    Sun 2021.01.10

    Happy New Year @user118601 and welcome someone with new ideas here. I had actually started on an interface to MIDI instruments several months ago using the MDBT42Q breakout to have Bluetooth connectivity, as opposed to WiFi, but have considered both. Planned on a few mini tutorials to supplement. Had to put the project on hold while faced with a few of life's challenges right now.

    Had just bridged the gap of using optoisolators for the current loop connectivity between devices, and left off at the point of starting to flesh out the controller code. Looking at schematics, connectivity could be accomplished without optoisolation, but I strongly recommend staying with using optos in the circuit, less risking destroying the $1000 synth I was connecting to.

    As @MaBe has provided a link to a summary of forum entries, I'd start there. I may be able to provide a bit of ongoing insight, but very limited time available, and no plans to be able to get back at this project in the next four months. I'll keep my eyes open for your posts in the mean time.

    From a link in the search results, the link there:


    looks like a good place to start.

  • in Bangle.js
    Avatar for Robin

    More specifically the subset:    https://banglejs.com/reference

    @Sebastian, the thread title clearly states 'Bangle.js' and Guillaume_G clarified new to Javascript. The link here #4 is the subset specific to Bangle.js while the link in your post #3 is the entire reference for all Espruino devices. No sense making more overwhelming than necessary.

    Over the past four years, the same questions are asked by those new to Javascript, and the reason that summary page was created and has been referenced over a thousand times. Rather than re-post those links here, it made sense to provide that post for perusal as a learning step and starting point for exploration.

    Which leads us to our forum New Year's resolution:

    Teach how to fish and not just provide the fish

    @Guillaume_G if these haven't been discovered yet, here are two excellent reference sites I still use to this day. The Mozilla Developer Network 'MDN' reference along with w3c.org standards are the places to go to understand the language specifics, while W3Schools has a nice interactive try before coding editor-viewer.


  • in Bangle.js
    Avatar for Robin

    Sat 2021.01.02

    Hello @Guillaume_G and Happy New Year!

    There are several links to the references outlined in:


    beneath heading: Bangle specific in post #1

  • in Bangle.js
    Avatar for Robin

    Tue 2020.12.08

    Hello @bppattan would you mind posting your code so that we may zero in on the problematic event logic, in order to point you to that area to focus on please.

    As is, is quite okay, even with those areas one is not so sure about. In this way others may be able to provide some insight on what they have learned over the years.

    re: 'API documentation'

    Which link are you using for which documentation reference?

    A good Tutorial post containing many valuable links:



    First search result returned using Google: Bangle reference


    Some insight may be garnered by viewing an existing app at:


    Find the 'GitHub' icon to the left below app title 'Touch Launcher' and R-Click open which will take you to: [Line 230]


  • in Other Boards
    Avatar for Robin

    Mon 2020.12.07

    Hi @titaniumwhite I'm responding as I noticed your post arrived indicating a Time Zone near myself, and most that are likely to respond, wont be available until tomorrow. I'm not a wiz using GATT, but I did remember a forum post a while back that asked a similar question.

    @Gordon provided a specific example in post #13

    GATT service on RuuviTag


    Handling of 32 and 128 bit uuids for BLE

    How to: 'Generate a UUID compliant with RFC 4122'


    I Googled using the 'site' qualifier: 128 bit UUID site:forum.espruino.com

    which returns a bunch of references which may assist also. These may not answer your question directly, but I didn't want you spinning your wheels just waiting until sunrise. Hope you find some insight there. . . .

  • in Pico / Wifi / Original Espruino
    Avatar for Robin

    Sun 2020.12.06

    Hello @user122041,

    re: 'The originals I can't seem to get to come up in the editor'

    Which flavor of editor [I presume 'WebIDE' was meant by 'editor'] and were the others tried and what were those results?

    Beneath heading: 'Same symptoms in online vs native WebIDE?'

    There are three links to the destination WebIDE types:


    Any recollection if the Original was ever re-flashed, or was it still at the initial factory firmware version?

    Any luck just connecting, following the firmware flash instructions?

    From my experience using Windows10 and the 'Native IDE', sometimes (most always) it is necessary to disconnect, close the IDE then relaunch it and connect, when connecting is problematic.

    re: 'windows 10 they come up as USB "Generic Billboard Device"'

    Using Windows10 Device Manager, mine show up as "USB Composite Device"

    Is it possible that there is a COM port conflict attaching these unknown boards. Maybe a re-scan for hardware changes, or even removing the assigned COM ports and a re-scan are in order perhaps?

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

    Sun 2020.10.11

    Hi @David1234321 I see that you are running 2V07 but on what device?

    Please post process.env so we are all on the same page.

    'then nothing - the device is not replay'

    Will need to understand which device is under test.

    What are the contents of the var when entering the vaiable name mcp into the L-Hand console window of the WebIDE?

    Maybe try wrapping in sections, several lines of code within a try/catch block to possibly learn more about the error itself.

    'after reboot from power - It run the old code (the one on the first post)'

    Was save() used?

  • in Pico / Wifi / Original Espruino
    Avatar for Robin

    Thank you for the voltage readings @user118421

    'Removing the the print line still leaves me with the same error'

    As the errors bubble up, and therefore appear in reverse order, I would have expected a slightly different output, as the specific error related to calling the print() function is now not present.

    Did you mean the same as in only the same for the first two line code block from #9 post perhaps? (I was attempting to determine if I2C was initializing [it's overhead] error free before attempting comm over the I2C bus)

    Under the assumption 5V has to be the minimum input voltage, any other way to supply that, or only just the USB cable available at the moment?

    'this specific display but as it failed just like the Nokia 5110'

    Do we have a separate issue here with the 5110? There is a tutorial, but that is based on SPI rather than I2C.


    I'm not a fan of using cutting edge builds for the existing tutorials, but as a consideration, would flashing to a previous version have a different outcome?

    I have not tried or tested, but it might mean an additional step is required. I'll defer to others for this: (see code block under the schematic, beneath heading 'Power, and the FET/B0 Jumper')


    ' Once the FET/B0 Jumper is shorted, the following commands will work:

    digitalWrite(B0,0); // Turn on the 'Bat' output fully '

    I'm not sure if 'Bat' means the VBAT pin 2 output, what the voltage might be, or whether this implies just a current boost. . . .