wifi.getIP(function(l,ip){console.log("IP= ",ip,"\n\r"+l);xIP=ip;});
I don't see this is puzzling: You're logging ip, the parameter - so of course it's going to be right.
ip
You could always do what you want from the getIP callback itself, rather than using setInterval?
getIP
setInterval
@Gordon started
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.
I don't see this is puzzling: You're logging
ip
, the parameter - so of course it's going to be right.You could always do what you want from the
getIP
callback itself, rather than usingsetInterval
?