You are reading a single comment by @JackJamesHoward and its replies. Click here to read the full conversation.
  • @DrAzzy Thank you for the suggestions. I tried both but it still doesn't work. The code i used was

    Serial2.setup(9600, { rx: B6, tx : B7 });
    var wifi = require("ESP8266WiFi").connect(Serial1, function(err) {
      if (err) throw err;
      wifi.reset(function(err) {
        if (err) throw err;
        console.log("Connecting to WiFi");
        wifi.connect("WiFi_Name","WPA2_Key", 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);
            });
          });
        });
      });
    });
    

    and to be sure I swaps the pins to

    Serial2.setup(9600, { rx: B7, tx : B6 });
    

    But I still get an error that reads

    echo(0);
    ERROR: Pin B7 is not capable of USART RX
    Suitable pins are:
    A3
    =undefined

About