Avatar for Vladimir

Vladimir

Member since Feb 2018 • Last active May 2018
  • 1 conversations
  • 9 comments

Most recent activity

  • in Pico / Wifi / Original Espruino
    Avatar for Vladimir

    Just leaving the board alone for a few minutes will cause a FIFO_FULL message?

    Well, After I have looked at this topic http://forum.espruino.com/conversations/­311969/ I found that there is also some logic for FIFO_FULL message to appear in my case. What I do?
    My server sends TCP request to Espruino to get consumption statistic from water-flow sensor.
    After I read data from the variable (flowSensor[0].volume()), I send data to console.log and back to the server in JSON-format through TCP connection.
    So I suppose the problem arise when simultaneously three functions execute their commands: setWatch, console.log, socket.write
    I need more tests to locolize the problem, but for now it works for 20 hours with a real waterflow sensor connected to the pin A0 with this change in the code: I execute socket.write("JSON formated data") with a delay of 200 ms.!
    If I occasionaly send simultaneously 2 TCP requests in a row, I will get FIFO_FULL error because to many instances of functions will occupy the input buffer

  • in Pico / Wifi / Original Espruino
    Avatar for Vladimir

    You could just try using something like this instead

    Thanks, It's quite simple and more clear for me.
    I implemented the code, but after some time I again recieve "New interpreter error: FIFO_FULL"
    It's important to mention that no sensors are connected to the pins (I do testing at home without any sensors) A0 and A1

  • in Pico / Wifi / Original Espruino
    Avatar for Vladimir

    So, finally I did a lot of different tests with Amperka library.
    I can not fully avert "FIFO_full" error. But I managed to adapt my code (exclude some options) to avoid crash of WiFi connections.

    1. I start initialisating of sensors with delay after the module has established connection to the server
    2. I do noy use on "pulse" listener. I suppose this function consumes lots of memory
      flowSensor[0].on('pulse', function () {})
  • in Pico / Wifi / Original Espruino
    Avatar for Vladimir

    Hi again,
    Update, probably the problem with FIFO full solved.
    What I did.

    1. I added require("Storage").eraseAll() to the E.on('init', function()...
    2. I changed sensor settings to
      flowSensor[0] = require('water-flow').connect(A0, {measurePeriod: 50});
      I guess the problem that to many data come to the module. Now I clear the cash and recieve less bytes per second.
      The module started to work propely! Great!
  • in Pico / Wifi / Original Espruino
    Avatar for Vladimir

    I just inlined

    Hi Mr. Gordon,
    I don't know but your code is not uploading to my module (Web IDE 0.68.6, firmware 1.97) because inlined module could not be found. I tryied different minification settings but I have not found the way to upload the code.
    Regarding errors:
    1.98 solved the problem with TCP client
    1.98 (as 1.97) I still can not use pins for reading data. I start water-flow module with delay of 50000 ms to let WiFi establish connection. But when I create water-flow sensors in couple of seconds I receive FIFO_FULL message.
    I'm not profecial programmer, where should I use this: require("Storage").eraseAll()?

  • in Pico / Wifi / Original Espruino
    Avatar for Vladimir

    Big thanks for your respond. I will have a look on the problem on weekends and will try to determine the problem more precisely.

  • in Pico / Wifi / Original Espruino
    Avatar for Vladimir

    FIFO_FULL message comes on load.
    1v96 worked fine. At least I've never recieved this mistake. But I could not be 100% sure with 1.96 as I'm in the procees of building my system and always update the code adding new fitures

    I provide modified sample of the code which caused the problem. The solution to connect WiFi was to comment the code with flow-sensor and also do not put ANY pin in to the input mode. Flow-sensor is library written by Amperka and it woked absolutely fine with 1.96 and 1.95. I have not modified any part of this library

    var HOSTS = ["192.168.1.92", "192.168.1.93", "192.168.1.95"];
    var WIFI = [
      ["Alhimik" , { password : "" } ],  //0
      ["Alhimik_N", { password : "" }],  //1
      ["A-Alhimik ", { password : "" }]  //2
    ];
    var INIT_OPTIONS = {"HOSTS": [0], 'WIFI': 0, 'ISSTART': 0, "Name": 'EspWater'};
    var wifi = require("EspruinoWiFi");
    
    var L = {
      'LED1': require("ledHandling")(LED1),
      'LED2': require("ledHandling")(LED2),
      'A5': require("ledHandling")(A5, 1),
      'A6': require("ledHandling")(A6, 1),
      'A7': require("ledHandling")(A7),
      'B1': require("ledHandling")(B1)
    };
    
    E.on('init', function() {
      USB.setConsole();
      console.log('started');
      L.LED1.On();
      //INIT_OPTIONS.ISSTART = 1;
      setTimeout(wifiOn, 1000);
    });
    
    var wifiOn = function(){
      console.log('starting WiFi');
      console.log(WIFI[INIT_OPTIONS.WIFI][0] + ' - ' + WIFI[INIT_OPTIONS.WIFI][1]);
      wifi.connect(WIFI[INIT_OPTIONS.WIFI][0],­ WIFI[INIT_OPTIONS.WIFI][1], function(err) {
        if (err) {
          console.log("Connection error: "+err);
          L.LED1.blink(50);
          setTimeout(wifiOn, 60000);
          return;
        }
        console.log("WiFi connected!");
        L.LED1.On(0); L.LED2.blink(100);
        for (var i in INIT_OPTIONS.HOSTS) {
          setTimeout(ccon, 5000 * i, INIT_OPTIONS.HOSTS[i]);
        }
      });
      return;
    };
    
    /*********
     FLOW-Sensor
     **********/
     var flowSensor = [];
     flowSensor[0]  = require('water-flow').connect(A0, {measurePeriod: 5});
     flowSensor[1]  = require('water-flow').connect(A1, {measurePeriod: 5});
    
  • Avatar for Vladimir

    Hi, with new 1v97 I've got this terrific trouble with “New interpreter error: FIFO_FULL”
    I use EspruinoWiFi, which is managed through TCP client connection, to handle water valves, read water-flow sensors, read humidity sensors and so on. Therefore, with new 1v97 I have to disable all pins, that read any data! As soon as I initialize any of them WiFi is down!
    And more troubles with 1v97. When initializing tcp client connection, double event-listeners are created (two onerror, two ondata and so on).

  • in News
    Avatar for Vladimir

    Hi, I'm dissapointed with the last firmware.
    1.My Espruino WIFI does not want to start the code on startup (I've changed E.On to Function onInit).
    2.The board sometimes looses connection to the IDE while uploading the code. The connection button is still on but progressstatus is stoping on the half while sending the code

    P.S. After hours of experimenting I've found the way how to launch the code on startup. I use both E.on('init'... and function onInit(){}. E.on just calls the function onInit. That was the only way to lauch on startup. I think it's quite strange. Tested with 2 Espruino WIFI boards. Both worked fine with just E.on... untill upgrade

Actions