You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • No luck replicating power issues here. I'm using this code:

    var wifi;
    
    function onInit() {
      wifi = require("EspruinoWiFi");
      wifi.connect(WIFI_NAME, { password : WIFI_KEY }, function(err) {
        if (err) {
          console.log("Connection error: "+err);
          return;
        }
        console.log("Connected!");
        wifi.getIP(function(err,ip) {
          console.log("IP address is http://"+ip.ip);
          createServer();
        });
      });
    }
    
    function createServer() {
      var http = require("http");
      http.createServer(pageHandler).listen(80­);
    }
    
    var fileNo = 0;
    
    function pageHandler(req, res) {
      var d = "";
      var boundary;
      req.on('close', function() { 
        console.log("File uploaded");
      });
      req.on('data', function(data) { 
        console.log("Got "+data.length+" bytes");
      });
      res.writeHead(200, {'Content-Type': 'text/html'});
      res.write('<html><body><form method="post" enctype="multipart/form-data">');
      res.write('<input type="file" name="file1" id="file"><input type="submit">');
      res.end('</form></body></html>');
    }
    

    and uploading a big file. The voltage is rock solid at 3.32v

    Having said that, I could reproduce your out of memory issues at least - and hopefully I found something that'll fix them. It seemed to be related to what happens when we're trying to send data to a socket at the same time as ESP8266 is sending it out.

    If you upload now the out of memory issues should be gone (or at the very least, better).

About

Avatar for Gordon @Gordon started