Board: ESPRUINOWIFI, 2v06
AT version:0.40.0.0(Aug 8 2015 14:45:58)
http://www.espruino.com/WiFi#connecting-to-an-ap
I copied this code and it works great when connected to device and flashing the code with Web IDE, but when I am disconnected from Web IDE and plug the device into USB, it keeps waiting for the Web ID on this line console.log("Response: ",res);. Once I re-connect with Web IDE, the code continues running. Also, if I change the line to console.log("Response: ",res.statusCode);, it also works without problems. It seems to be problem cumulative size of console output.
This is easier to notice when you turn on different LEDs during the request, you can reproduce it by replacing the getPage function with this:
Is there some way to check if device is actually connected to Web IDE, so I could rewrite console.log function to discard the output? I tried E.getConsole(), but that returns "USB" no matter if I am actually connected to Web IDE or not. Using a USB cable that doesn't support data returns "Serial1", but that cable never causes the console.log to stop either.
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.
Board: ESPRUINOWIFI, 2v06
AT version:0.40.0.0(Aug 8 2015 14:45:58)
http://www.espruino.com/WiFi#connecting-to-an-ap
I copied this code and it works great when connected to device and flashing the code with Web IDE, but when I am disconnected from Web IDE and plug the device into USB, it keeps waiting for the Web ID on this line
console.log("Response: ",res);
. Once I re-connect with Web IDE, the code continues running. Also, if I change the line toconsole.log("Response: ",res.statusCode);
, it also works without problems. It seems to be problem cumulative size of console output.This is easier to notice when you turn on different LEDs during the request, you can reproduce it by replacing the getPage function with this:
http://forum.espruino.com/conversations/306063/
This looks like similar issue, but it feels odd that console.log sometimes works properly and sometimes doesn't.
Is there some way to check if device is actually connected to Web IDE, so I could rewrite console.log function to discard the output? I tried
E.getConsole()
, but that returns "USB" no matter if I am actually connected to Web IDE or not. Using a USB cable that doesn't support data returns "Serial1", but that cable never causes the console.log to stop either.