-
• #2
Also this is the code running on my thingy device:
https://github.com/bakon11/openrpcThingy52/blob/master/server/typescript/src/devices/thingy52.jsI noticed that it actually does execute the function each time, but it disconnects before the call back fires off back to node JS and my data comes back undefined.
-
• #3
Is the problem in this case just that you are calling
init
twice? You should only callinit
once, but after that multiple calls toexpr
should be fine. -
• #4
oh oops you're right, unfortunately that didn't solve my problem. I'm making a better post about it on the github commit.
Thank you.
Hey guys.
So I have the nordic thingy52 with espruino 1v98 since I can't flash newer versions due to locked bootloader.
Anyways, I wrote a small program to run on it to basically collect some sensor data and store them in typed arrays in the ram, and a small data extraction function based on some examples from espruino.
Everything actually works great, the problem I'm having is when using the espruino NPM package(https://www.npmjs.com/package/espruino).
Im using the example to run expresion function on the device.
And on first call it works great and returns data to my app, however when I do the same call again I get unable to connect error:
And basically it does this until I stop and start the nodejs app again.
Thank you.