Avatar for Ducky

Ducky

Member since Sep 2013 • Last active Mar 2017
  • 18 conversations
  • 124 comments

I am a dakki

Most recent activity

    • 13 comments
    • 792 views
  • in ESP8266
    Avatar for Ducky

    Very strange to hear that the WebIDE is causing you issues, in my expericnes its very reliable. However if you wish to, you can use the Espruino NPM Module and set it to watch a file, then you can use Sublime Text to exit a local JS file and every time you save it, it will be sent to the Espruino.

    You could also try to use the WebIDE as a native windows program, here's where to get it.

  • in ESP8266
    Avatar for Ducky

    Perhaps this post could be useful to you, there are also instructions for the SSD1306 just below.

  • in General
    Avatar for Ducky

    @CanyonCasa I could be totally wrong here, but from the way @urbiman said "bake javascript into the firmware" leads me to believe he wants to compile a binary of Epruino with some javascript embedded so when he flashes it to a chip it already has the code on it and doesn't need to then be programmed by the WebIDE. Though I could be wrong.

  • in Projects
    Avatar for Ducky

    Hey, You shouldn't need to add anything to the code to make it print the message to the console, the

    ws.on('message',function(msg) { print("[WS] "+JSON.stringify(msg)); });
    

    line does that. However, perhaps you need to JSON.stringify it first.
    I just pasted the code I posted above your comment and put it on my ESP, connected and it worked perfectly from both my desktop Chrome, and my Android Chrome. Perhaps you have an out of date web-browser that doesn't support web-sockets?

  • in Interfacing
    Avatar for Ducky

    Just gonna do some self-endorsement here, you could try using HttpToHttps like in this post.

  • in ESP32
    Avatar for Ducky

    JavaScript in the browser handles multiple threads of JavaScript via Web-Workers, perhaps there could be an implementation like that?

  • in Projects
    Avatar for Ducky

    The watch I ordered arrived sooner than expected. As I expected the watch doesn't contain a nRF51, it actually uses a Dialog DA14580, we've seen this chip before in this thread. So no Espruino, but, this one does actually pair to my phone. I took some pictures while deconstructing it, I could post them if anyone is interested on how the Heart Rate sensor connects.

  • in Interfacing
    Avatar for Ducky

    Yeah that works no problem, after I added custom header support ;)

    I̶t̶ ̶s̶h̶o̶u̶l̶d̶ ̶w̶o̶r̶k̶ ̶w̶i̶t̶h̶ ̶h̶t̶t̶p̶.̶r̶e̶q̶u̶e̶s̶t̶ ̶b̶u̶t̶ ̶I̶ ̶c̶a̶n̶'̶t̶ ̶g̶e̶t̶ ̶a̶n̶y̶ ̶f̶o̶r̶m̶ ̶o̶f̶ ̶t̶h̶a̶t̶ ̶t̶o̶ ̶w̶o̶r̶k̶,̶ ̶e̶v̶e̶n̶ ̶i̶f̶ ̶t̶h̶e̶r̶e̶ ̶i̶s̶n̶'̶t̶ ̶a̶n̶y̶ ̶c̶u̶s̶t̶o̶m̶ ̶h̶e̶a̶d̶e̶r̶s̶.̶

    And ready for Espruino here you go:

    var options = {
      host: 'httptohttps.xyz',
      path: '/https://api.fencer.io/v1.0/geofence',
      method: 'GET',
      headers: { "Authorization" : "YOUR-KEY-HERE" }
    };
    require("http").get(options, function(res) {
      var contents="";
      res.on('data', function(data) {
        console.log(data);
      });
      res.on('close', function(data) {
        console.log("Connection closed");
      });
    });
    

    Something strange happens if I try add data to contents though, it just returns false, that's why I thought I couldn't get it to work.

Actions