-
Espruino WIFI
2v11 (c) 2021 G.Williamssave()
=undefined
Compacting Flash...
Calculating Size...
ERROR: Too big to save to flash (9361 vs 2520 bytes)
Deleting command history and trying again...
Code is too big to save to Flash.Minification is on with Esprima offline. In the past there were no problems with uploading my code. Smthng went wrong after updating to 2v11 or updating IDE
-
installing the native app version: http://www.espruino.com/Web+IDE#as-a-native-application
It works! Thanks for the answer. I think it would be usefull to include this to the Troubleshooting page.
-
I did not know there is a difference btw Web-IDE and Web store IDE. In fact I use Web Store IDE. In the past it worked fine with the same PC and Win7, but something went wrong and I can not connect any more. I will provide later some screenshoots with the "status".
Are there any way that some antivirus or corporate security system can block access to the com port? There were some updates on PC to porvide more security -
Hi,
I have not found my case in Troubleshooting. So I'm describing the problem here.- The Esp WIFI with the same cable works fine with Win10.
- In Win7 I've got the board in Windows Control Panel's 'Devices and Printers' page - 'STMicroelectronics Virtual COM Port (COM8)'. The status is Ok. The IDE reports 'searching ... no ports found'. I tried all different options: reinstalled drivers, reinstalled WEB-ide, reset and cleaned COM ports. No changes.
Moreover when i Hold down the button, and then plug the board in while keeping it held, I get 'Red and Green light brightly for a fraction of a second, then they start 'pulsing', and sound signal of a connection to PC. But nothing happens on the side of IDE
- The Esp WIFI with the same cable works fine with Win10.
-
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. -
-
How much data is there in the JSON?
[["A0",49.06],["A1",0]]
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
-
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 -
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 -
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.- I start initialisating of sensors with delay after the module has established connection to the server
I do noy use on "pulse" listener. I suppose this function consumes lots of memory
flowSensor[0].on('pulse', function () {})
- I start initialisating of sensors with delay after the module has established connection to the server
-
Hi again,
Update, probably the problem with FIFO full solved.
What I did.- I added require("Storage").eraseAll() to the E.on('init', function()...
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!
- I added require("Storage").eraseAll() to the E.on('init', function()...
-
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()? -
-
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 fituresI 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});
-
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). -
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 codeP.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
The problem was that there were no any files seen in the storage via IDE.
But as soon as I executed "eraseAll" command my Espruino became alive again. So, the storage was probably filled with some hidden trash due to some occasion.
Thanks for the help