-
-
-
Hi Gordon,
Do i have to protect my function from calling twice in "parallel" ?
Let say i have a function that talks over an uart to a device. The communcation must happen in series and never parallel.I call this function by setInterval/setTimeout and with setWatch. The protection is easy, i can set a variable inside the function at the beginning and clear it at the end ant checking for that.
I just want to know if it can happen.
Thanks
Sacha
-
-
-
-
-
-
-
-
-
Hi Gordon,
I don't want to hijack a thread. I create a new one with your statement:
"One other thing that could be an issue is that if you have Espruino powered from a computer, the computer connects to it via USB but stops reading data after a few characters have been sent. This means that if you're using print/console.log then after a while Espruino will stop working as it's waiting for the computer to read the data it's printing. If you either run a terminal app, or connect Espruino to a USB power supply, it'll be fine though."
Is this proven ? If yes that's very vey important to know and should be included in the documentation of console.log.
Is this also true in general for all uarts? Lets say a serial device (LCD or transmission module) crashes or disconnects. Is it then a question of time that espruino crashes too, because of buffering and waiting?
I do not know of such a behavior on the arduino side.
For me it looks like a trap that should be considered as a bug.
Sacha
-
-
-
Hi Gordon,
Too much code, we have to save memory where ever it is possible until an Espruino++ with 96KB is available ;-)
The split/join method is small:
'Dear Espruino !'.split('Espruino').join('Gordon'));
Worked. Returned:
'Dear Gordon !'
But there is another bug in split:
'Dear Espruino'.split('Espruino').join('Gordon');
Returns: 'Dear Espruno' and not 'Dear Gordon'
The reason is that split fails to split the element when it's at the end of the string.
'Dear Espruino'.split('Espruino') returns
'Dear Espruino'.split('Espruino');
=[ "Dear Espruino" ]correct is:
=[ "Dear ", "" ]
See : http://jsconsole.com/?%27Dear%20Espruino%27.split(%27Espruino%27)%3B
Sacha
-
-
-
-
Yes, Yes, Yes, i know that this is a repeat ;-)
Pure tcp socket support, mybe a subset or something like
http://nodejs.org/api/net.html
Sacha
-
-
-
Hi Gordon, DrAzzy,
Autodetection in Espruino would be very nice. I think i could solder the CPU to the board by my self. Maybe you can point me to the right place where i can buy a few STM32 Chips with 96KB. But i don´t want to build espruino myself everytime a fine new version comes out.
My current wish is that Gorden has built in support, we have to solder it by our own until Gorden sells them too.
Thanks
Sacha
-
Hi Gordon,
My current project is a home automation project with a lot of modules for switches, controls, timers, sensors, displays and so on. The communication is based on the xBee module. On top a communication module with an integration to the FHEM homeautomation system (http://www.fhem.de). The configuration is stored on sd and loaded on startup. When i finished everything i will post it.
I do not use much simple arrays, the code is well optimised. Everything is minified. For me the space is very tight. Doubling the memory would definitive help without touching the limit again.
Sacha
Hi Gordon,
It sounds a bit odd. What about a hardware hack to tell your firmeware during boot that we have a cpu with more RAM ? Like a jumper between 3.3v and A1 ? Or solder something to a unused/unsupported pin ?
Sacha