-
@JumJum, hello again. I continued to search for answers, even have found ur 5 year old thread on esp32, where you state that:
- ESP32.enableBLE(false/true) , adds about 1900 additional JsVars
- ESP32.enableWifi/false/true) , adds about 3800 additional JsVars
And I see that lots of people are talking about switching BLE off to get more free memory. But even 2500 jsVars is only ~35Kbytes, meanwhile my board advertises to have around more than 500 KBytes of ram. That's just nonsense!
- ESP32.enableBLE(false/true) , adds about 1900 additional JsVars
-
Reference page says that "E.getSizeOf() returns the number of variable blocks used by the supplied variable".
But how should I estimate the real size of entities in my app? For example, E.getSizeOf(Number.MAX_VALUE) returns 1, meanwhile the bocksize is 14 (according to process.memory) and espruino numbers are 64bit. It just makes no sense for me.Sorry for asking kind of stupid question, but I really want to figure out how to calculate size of objects as preciese as possible. Thanks for answer in advance!
-
-
Hello everyone. I'm using ESP32 Wroom 32 devkit. It is advertised as having
- Flash-memory: 448 Кb
- SRAM-memory: 520 Kb
BUT as I use process.memory(), I get quite confusing answer:
Total of 2351 block * 14 bytes (blocksize) results in ~33Kbytes what is extremly low.
Even if I made a mistake in calculations, I have seen with my own eyes how quickly I lose 2/3 of memory total memory after just a few requires(btw all files are minified) and launching a ws server with 2-3 connections.
How do u think, can it be a problem with the firmware or Wifi + BLE modules take soo much memory?
- Flash-memory: 448 Кb
-
-
Btw, I wanted to ask why it looks like I'm only slightly changing the route of data (as it still goes from REPL to IDE console through USB and vice versa) but on practice IDE console is loosing it's functionality ('ctrl+c' like u have said before, Up keyword doesn't print the previous command, backspaces don't properly clear console and etc). That all makes console kind of vulnerable for improper input. No way to change it?
-
-
I just wanted to say that when I catch console logs and answers from interactive console with code like this
USB.on('data', data => { inbuf.Push(data); }); setTimeout(() => {E.setConsole(LoopbackA);}, 200); LoopbackB.on('data', data => { outLogs.push(data); USB.write(data); }); setTimeout(() => { console.log('some text'); }, 500); setTimeout(() => { LoopbackB.write('2+3\r'); }, 1500);
I get logs like this:
[ "<- USB\r\n>", "\r\x1B[Jsome text\r\n>", "2+3\r\n=5\r\n>", "10+3\r\n=13\r\n>", "\r\x1B[J-> USB\r\n" ]
That looks quite readable, but some situations lead to logs like this:
"outLogs\r\n=[ \r\n \"" ... "\\n ]\\r\\n>\"\r\n ]\r\n>"
So I have to remove all special symbols somehow. Yeah, it's not hard at all to write a simple parser on regexps for those exact types of logs, but as I don't know how exactly IDE is formatting logs, I may easily trap into using code that doesnt work correctly for some cases. So, what would you advice?
-
Hello again. As REPL returns data (I am about data that comes on LoopbackB.on(data => ...) with various combinations of special symbols ['\r\n', '1x0B[', etc], I wanted to ask if it's possible to check all those "heads" and "tails" of messages.
Yes, in a common case, it's not hard to parse text from there with regexps, but this way I can easily not to take some cases into account. Thanks for attention! -
Hello again! That was a very helpful advice, but now I'm struggling with such a problem - obviously after LoopbackA.setConsole() I lose opportunity to prompt commands into IDE console and it is inacceptable accordint to my plans. What could You advise?
P.S looks like I already fixed it by piping default console (USB in my case) with LoopbackB.
-
I want to realize a certain logic, that would kind of change the way console.log works. I want it to send data not just into Espruino console, but into my webpage/node-red/somewhere else.
What would be the most optimal way to do it?As I work with various Espruino devices, it's very important to choose the universal way, so I would rely on usb connection, but not bluetooth or something else.
Thank in advance!
I wanted to turn wifi off on my board to check out how much memory it would release. Unfortunatly I trap into infinite trying to boot. Firstly I get:
Then:
I know that re-flashing helps to "fix" the board but I need t0 find a way to turn wifi off.
I will be much thanksful for your advice.