Avatar for user125066

user125066

Member since Feb 2021 • Last active Jun 2022
  • 1 conversations
  • 20 comments

Most recent activity

  • in Bangle.js
    Avatar for user125066

    Thanks for the tip. Updated the example above.

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

    I could only find it as an APK to download and install on android. Run the installed PuckJS app and it installs the PuckJS plugin into Droidscript.

  • in Bangle.js
    Avatar for user125066

    Hi Gordon, Thanks for the quick reply. I eventually worked it out. I want to get some data in real time from a Bangle app onto the android screen.

    In Droidscript

    // Connect to Bangle
      puck = app.CreatePuckJS();
      puck.SetOnReceive( readResponse );   // Callback to capture console output from app.
      puck.Scan("Bangle");
    

    The callback function something like :

    function readResponse(data) {
        if ( data.substring(0,1) != '{' ) return;       // ignore non JSON
        d = JSON.parse(data);
      // Do something with the data in array d
    }
    

    In the Bangle app the dat array is sent as a JSON string :

    function btSend(dat) {
      // console.log(JSON.stringify(dat));         // transmit the data
      Bluetooth.println(JSON.stringify(dat));         // transmit the data
    }
    

    It will all be published in the 'GPS Adventure Sports II' Bangle app soon.

  • in Bangle.js
    Avatar for user125066

    Hi Gordon,

    I have this working up to this point. With Droidscript I can call an app function as you outline here.

    I need one more step and that is to return some data from that function back to Droidscript and that has me completely stumped. Is that possible?

    Thanks
    Mike

    • 15 comments
    • 1,774 views
  • in Bangle.js
    Avatar for user125066

    Thanks. That looks promising.

  • in Bangle.js
    Avatar for user125066

    ... just noticed that the gesture that wakes the screen keeps the display constantly on when doing activities that involve raising and lowering your arms and hands. Working on stuff on a bench and general activity around the house seems to keep the screen on. Even typing this on the keyboard keeps enabling the screen.

    Not generally noticed this happening in right way up mode.
    M

  • in Bangle.js
    Avatar for user125066

    @Gordon Brilliant. You are a magician.

    That certainly seems to make it usable for me. Last touch is to turn around the watch strap. I only use the default clock and the GPS Adv Sports app at this stage.

    Just some comments to consider.

    • It doesn't look like BTN4 and BTN5 are swapped. Not an immediate problem for me.
    • Now 'BTN3' (standard BTN1 )to turn on and initial boot screen is 'upside down'. To be expected.
    • Original standard BTN3 long press to exit app back to watch has not changed. I guess that is something deeper in the OS and not affected by the javscript BTN swap code.
    • Swipe is not something I use.
    • A full 'lefty' firmware version would be great! I would be happy to help if I could. Having said that I am not expecting you to spend time on something that only 10% of the population might use.
    • I can activate the screen by rolling my wrist away from me. A little odd and inconvenient but doable for hands free turn on from power save mode. Absolutely essential while sailing as seldom have the other hand free to touch a button.

    In short I think I have enough to use it in lefty mode but there are some things that could be polished.

    I really appreciate the help so far.

    Regards
    Mike

  • in Bangle.js
    Avatar for user125066

    Great thanks.I'll try that tomorrow.

    Before I do.... How do I back that out if I need to?

    M

  • in Bangle.js
    Avatar for user125066

    Great, thanks. Really helpful starting point tip.

    A quick play has revealed :

    • Screen is flipped as expected.
    • Screen/graphics refreshes in apps seem rather slow. Refreshes line by line from the top ( as flipped ).
    • Gesture to turn on clock from power saving no longer works. Presumably rotation of wrist is now opposite to what is programmed.

    It is sort of usable.

    Cheers
    M

Actions