Running onInit()...
{
"ip": "192.168.2.16",
"netmask": "255.255.255.0",
"gw": "192.168.2.1",
"mac": "60:01:94:07:ab:1e"
}
Client connected
Uncaught Error: Function "write" not found!
at line 1 col 35
....log("Client connected");a.write(b.mqttConnect(b.client_id))...
^
in function "e" called from line 3 col 353
..."close")});b.client=a};a?e():a=require("net").connect({host:...
^
in function "connect" called from line 1 col 109
...onnect({client_id:'booger'}),mqtt.on('connected',function(){...
^
in function called from system
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Here is the code that works without error:
Here is what process.memory() shows:
Change line 31 from:
to:
This is the result:
Here is what process.memory() shows: