Okay, nevermind, it's failing constantly now and I can't figure out why.
And I can sometimes for a short time get things with browser, but python script can't for reasons entirely unclear to me
And now very mysteriously, it seems to be working. What sorcery is this?!
It could just be a flaky USB power supply?
USB.setConsole(true);when USB isn't connected is totally fine - anything that gets written to USB will just get thrown away when Espruino knows the connection is down.
I think there may have been a confluence of issues here - it looks like dns wasnt working correctly. I had to switch where it got the time from anyway, so i did that. Also, the wiz550io seems to behave badly when the espruino is reset (losing sockets) and requires power to be removed for an awkward length of time to reset.
If theres a way to reset the wiznet controller from software, i think espruino needs to do that when initializing it. If not, im going to wire up the nRST pin of the wiz550io and reset it that way before i start talking to it
I just checked on this and there's (as usual) a bit of an issue with adding software reset:
The wiz550io actually contains a little microcontroller than configures a MAC address that's set at the factory. If you software reset the w5500 then you lose that - but if you try and remember the MAC address from before then you might be remembering an invalid address and not actually resetting it properly.
So basically the only way to do it properly is to use the reset pin...
Running my desk lamp code, I'm having a very strange issue....
When powered by the USB port on a computer, it runs flawlessly for days.
When powered by a USB charger, it freezes (setBusyIndicator LED is on continuously) after a short time.
What could cause this behavior?
Code is here: https://github.com/SpenceKonde/AzzyProjects/blob/master/GraphProject/DeskController/DeskController.js
I'm wondering if it's related to the:
And is getting unhappy because there's nothing connected to the USB. In this case, how can I make it do USB serial if USB is connected, and if not, not send the console to Serial1, which will be connected to something that will be broken by any console output?