You are reading a single comment by @MarcoM and its replies. Click here to read the full conversation.
  • Please check out this draft tutorial for setting up your wireless so you can remove the wifi.connect stuff from your code. Then you start you code with the require("http") and http.creaseServer. You don't need to wait for the esp to actually connect to your wifi to start the http server.

  • @tve. I tried to put

    var wifi = require("Wifi");
    wifi.connect("myssid", {password:"mypass"}, function(err){
      console.log("connected? err=", err, "info=", wifi.getIP());

    And i'm connected, but next time i do reset() cycle and i try to write a wifi.getIP() i get this response

    Uncaught ReferenceError: "wifi" is not defined
     at line 1 col 5

    It looks like the code is not stored into the flash


Avatar for MarcoM @MarcoM started