Avatar for Vladimir


Member since Feb 2018 • Last active Jul 2018
  • 1 conversations

Most recent activity

  • in Pico / Wifi / Original Espruino
    Avatar for Vladimir

    Is it logging water flow, or does it also control solenoid valves as well?

    Of course it controls solenoids. You can find 5V 2-Channel Relay Module inside the plastic box. Solenoids are powered by 12v. I use Adafruit DC-DC converter to power the Espruino. So the hole sistem is powered by one DC trasnformer.
    And I plan to add Soil Humidity Sensor Modules for better control and more statistic.

  • in Pico / Wifi / Original Espruino
    Avatar for Vladimir

    It works for two weeks w/o errors.
    What I did:

    1. I use your code to work with water-flow sensor. I avoid calling
      flowSensor[0].on('pulse', function () {}
    2. I do not call console.log!
      And, enclosed some pics how it works
  • Avatar for Vladimir

    How much data is there in the JSON?


    And you are using one of the recent firmwares like 1v97 or later?

    1v98 and 1v99

    but you say nothing is connected to the flow sensor pins?

    A0 pin connected to nowere produced to many "noise" - probably that triggered the problem. Now I connect the real sensor to the pin A0 to make situation close to the real life usage

    Is there any chance you could come up with a self-contained example you could send me that actually exhibits the problem?

    Well, I'm motivated to identify the problem if it still exists. But for now after your advices probably the solution is found. At least for now the test module works correctly for 1.5 day and I'm planning to use it in real life

  • 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

  • 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

  • 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 () {})
  • 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!
  • 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.