• FYI

    For sending simple commands to Bangle using Noble/BluePy/Gattool there is an extensive description with examples here: http://www.espruino.com/Interfacing#python

    The BluePy example code can be modified to send a file with Espruino commands in it to Bangle for execution by replacing

    command = "\x03\x10clearInterval()\n\x10setInterval(function() {LED.toggle()}, 500);\n\x10print('Hello World')\n"
    

    with something like

    f = open(sys.argv[2], "r")
    command = f.read()
    

    The BluePy example code can be changed to send a text file to Bangle Storage by replacing

    command = "\x03\x10clearInterval()\n\x10setInterval(function() {LED.toggle()}, 500);\n\x10print('Hello World')\n"
    

    with something like

    f = open(sys.argv[2], "r")
    command = f.read()
    command = 'var Storage = require("Storage");var f = Storage.open("' + sys.argv[2] + '","w");f.write(`' + command + '`);\n'
    
    

    Maybe it's for use for someone.

About

Avatar for gerardwr @gerardwr started