• Thanks. I tried it in the following way but with the same result (even without deep sleep):

    var WIFI_NAME = "";
    var WIFI_OPTIONS = { password : "" };
    
    function onInit() {
      wifi = require("Wifi");
     // Call to an function that kicks off my code
      setInterval(function() {
      connectToWifi();
      //setDeepSleep(1);
      }, 10000);
    }
    
    function connectToWifi(){
      console.log("connectToWifi");
      var wifi = require("Wifi");
      wifi.connect(WIFI_NAME, WIFI_OPTIONS, function(err) {
      if (err) {
        console.log("Connection error: "+err);
        return;
      } else {
        console.log("Connected!");
        getPage();
      }
        console.log("End");
      });
    }
    
    function getPage() {
      require("http").get("http://www.pur3.co.uk/hello.txt", function(res) {
        console.log("Response: ",res);
        res.on('data', function(d) {
          console.log("--->"+d);
        });
      });
    }
    
    
    
    
    

    Calculating Size...
    Writing..
    Compressed 36800 bytes to 2742
    Running onInit()...
    connectToWifi
    connectToWifi
    connectToWifi
    connectToWifi
    connectToWifi
    connectToWifi
    connectToWifi
    connectToWifi
    connectToWifi
    connectToWifi
    save();

About

Avatar for user106328 @user106328 started