Two troubles with new 1v97 v on EspruinoWiFi #4645
Replies: 1 comment
-
Posted at 2018-05-10 by @gfwilliams Ahh, sorry - the double event listeners on TCP issue is something that we spotted yesterday and that literally just got fixed 15 minutes ago. I'll be doing a new release (1v98) with it in soon, but new firmwares from https://www.espruino.com/binaries/travis/master/ have a fix in. However could you provide any more info on how the FIFO_FULL message comes about? Is it during upload? It's caused when there are too many characters/input events coming in to Espruino WiFi for it to handle. What was the older firmware that worked for you? The FIFO_FULL checking and message has been around for a while, but we recently added flow control to Espruino WiFi to avoid losing characters from the ESP8266, it will now stop the ESP8266 from sending data if the fifo is looking full. Could it be:
If you're able to share your code (or a subset of it that exhibits the problem - ideally without requiring external hardware to be connected) I can take a look and try and figure out what the problem is. Posted at 2018-05-10 by Vladimir FIFO_FULL message comes on load. 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
Posted at 2018-05-10 by @gfwilliams I just inlined the Amperka module (and made a version of
I can't see anything in there that'd cause problems either - unless there was loads of water (100ml/sec) flowing through your water flow sensors. Can you try calling Posted at 2018-05-10 by 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. Posted at 2018-05-20 by Vladimir
Hi Mr. Gordon, Posted at 2018-05-20 by Vladimir Hi again,
I guess the problem that to many data come to the module. Now I clear the cash and recieve less bytes per second. Posted at 2018-05-21 by @gfwilliams Great! Sounds like there was already some code in memory from something else that might have been keeping Espruino too busy.
All you need to do is copy&paste it on the left-hand side. No need to add it to Posted at 2018-05-22 by Vladimir So, finally I did a lot of different tests with Amperka library.
Posted at 2018-05-22 by @gfwilliams I would maybe avoid calling It looks like Amperka's library isn't expecting the number of pulses per second that you are getting from your sensors. In fact looking at it the whole thing is really inefficient if you have even 100 pulses/second. You could just try using something like this instead:
Although you'd have to apply some scale factors to volume and speed. Posted at 2018-05-22 by Vladimir
Thanks, It's quite simple and more clear for me. Posted at 2018-05-23 by @gfwilliams
Wow, ok. I must have missed that - that is very surprising then. So you're saying that if uploading the code from here: http://forum.espruino.com/conversations/320598/#14228511 Just leaving the board alone for a few minutes will cause a FIFO_FULL message? Or is there some other code I could upload to a bare Espruino WiFi to see if I can reproduce it? Posted at 2018-05-23 by Vladimir
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? Posted at 2018-05-24 by @gfwilliams
How much data is there in the JSON? And you are using one of the recent firmwares like 1v97 or later? Those should include flow control on the WiFi chip, so the Wifi itself shouldn't be able to trigger a FIFO_FULL unless something else is pushing lots of data in (but you say nothing is connected to the flow sensor pins?). Actually, you could be hitting issues because of your Also, when you're running when disconnected from USB, the console will switch over to Serial on B6/B7, which is running at 9600 baud so would potentially slow things down. You could fix it using Is there any chance you could come up with a self-contained example you could send me that actually exhibits the problem? Posted at 2018-05-24 by Vladimir
[["A0",49.06],["A1",0]]
1v98 and 1v99
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
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 Posted at 2018-05-24 by @gfwilliams
The pin mode should have been set to
Do you get anything on the console? Posted at 2018-06-04 by Vladimir It works for two weeks w/o errors.
Attachments:
Posted at 2018-06-05 by @gfwilliams That's great! Thanks for letting me know! Is it logging water flow, or does it also control solenoid valves as well? Posted at 2018-06-05 by Vladimir
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. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-05-09 by 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).
Beta Was this translation helpful? Give feedback.
All reactions