You are reading a single comment by @user118421 and its replies. Click here to read the full conversation.
  • I have not received the TTL USB adaptor yes but tried this;

    I connected the Pixl.js to the ESP8266 Esp-01 like this;
    Pixl.js <-> Esp01
    GND <-> GND
    3.3V <-> EN
    3.3V <-> 3.3V
    D0 <-> RX
    D1 <-> TX

    Then ran this;

    var serial = Serial1;
    var pins = { rx: D1, tx : D0 };
    function test(baud) {
      serial.removeAllListeners();
      var l="";
      serial.on('data', function(d) {l+=d;});
      serial.setup(baud, pins);
      serial.write("AT+GMR\r\n");
      setTimeout(function(){console.log(JSON.s­tringify(l));},800);
    }
    setTimeout(function() { test(9600); }, 2000);
    setTimeout(function() { test(115200); }, 3000);
    setTimeout(function() { test(57600); }, 4000);
    setTimeout(function() { console.log("Done!"); }, 5000);
    

    The result;

    "AT+GMR\r\r\nAT version:1.1.0.0(May 11 2016 18:09:56)\r\nSDK version:1.5.4(baaeaebb)\r\ncompile time:May 20 2016 15:08:19\r\nOK\r\n"")m\u00E9oI\r\n"
    

    However, when I then run this the Pixl.js just disconnects from my PC Espruino Web IDE bluetooth and enters into a boot loop..;

    var WIFI_NAME = "x";
    var WIFI_PASS = "x";
    
    Serial1.setup(115200, { rx: D1, tx : D0 });
    var wifi = require("ESP8266WiFi_0v25").connect(Seri­al1, function(err) {
      //                ^^^^^^^^^^^^^^^^
      //                Use ESP8266WiFi here (and 9600 baud) if you have an ESP8266 with firmware older than 0.25
      if (err) throw err;
      console.log("Connecting to WiFi");
      wifi.connect(WIFI_NAME, WIFI_PASS, function(err) {
        if (err) throw err;
        console.log("Connected");
        // Now you can do something, like an HTTP request
        require("http").get("http://www.pur3.co.­uk/hello.txt", function(res) {
          console.log("Response: ",res);
          res.on('data', function(d) {
            console.log("--->"+d);
          });
        });
      });
    });
    
About

Avatar for user118421 @user118421 started