-
• #2
How are you powering the Espruino WiFi? Please could you run
E.getAnalogVRef()
and check what value it returns?It's possible that there's some issue with the voltage on the device which is causing the Wifi module not to boot?
It also seems that maybe there's some other code in there that you're uploading (eg you're calling
getWeather
). Please could you try:- Run
require("Storage").eraseAll()
on the left hand side of the IDE Upload this most basic code from https://www.espruino.com/WiFi#connecting-to-an-ap and see if you still have the issue:
var WIFI_NAME = ""; var WIFI_OPTIONS = { password : "" }; var wifi = require("Wifi"); wifi.connect(WIFI_NAME, WIFI_OPTIONS, function(err) { if (err) { console.log("Connection error: "+err); return; } console.log("Connected!"); getPage(); }); function getPage() { require("http").get("http://www.pur3.co.uk/hello.txt", function(res) { console.log("Response: ",res); res.on('data', function(d) { console.log("--->"+d); }); }); }
- Run
-
• #3
The value is between 3.31 and 3.04.
I have a LED strip soldered to the + - and B15
When LEDs are active around 3.0
After removing the wires again the values are a little higher, between 3.312 and 3.315When I remove all unrelated code in my program I get the same error.
Same when I uploaded your snippet.
I erased all storage and used reset to clear the RAM but nothing helps.The LED strip is still working as expected.
Could I have damaged the ESP8266 in some way?
I always had my espruino connected to my laptop, I'm not 100% sure but after I plugged the USB into a standard android phone USB power plug it stopped working.
Typically it was the moment that I finalised my project and wanted to show it the first time to someone else it died. So frustrating :)
BTW any idea when the Espruino WIFI will be back in stock?
1 Attachment
-
• #4
Thanks for checking - that's very interesting then!
The LEDs are connected to the 5v wire which is connected direct to USB power. When they are active and you're seeing 3v on
E.getAnalogVRef()
, that'll be because the actual USB power line's voltage has dropped from the normal 5v to something like 3.2v or so - so it's really going to be stressing whatever you've connected it to (your PC?).But without it, the 3.3v rail seems ok.
Please could you try this and see if anything at all gets printed?
var WIFI_BOOT = A13; var WIFI_CHPD = A14; digitalWrite(WIFI_CHPD, 0); // turn off wifi var pins = { rx: A3, tx : A2 }; Serial2.on('data', function(d) { console.log("wifi:",JSON.stringify(d)); }); Serial2.setup(115200, { rx: A3, tx : A2 }); setTimeout(function() { digitalWrite(WIFI_BOOT, 1); // out of boot mode digitalWrite(WIFI_CHPD, 1); // turn on wifi }, 500);
It's hard to believe a different USB supply would have caused an issue for you - the voltage regulator is rated for about 16v so even if it was seriously out of range it's unlikely to cause problems.
I'm hoping to have some more Espruino WiFis eithin the month - I've got pretty much all the parts needed here for assembling a new batch, but I've just had a bit too much on to get them made recently.
-
• #5
Nope, nothing is printed.
so it's really going to be stressing whatever you've connected it to
Is it a bad idea to attach the LED strip directly to those pins?
It's always a max of 10 neopixels that will be toggled on and off.
I'm making some kind of weather station that gets the data from an API so eventually I want to plug my device into a socket with a USB supply and keep it running for days. -
• #6
Ok, thanks for trying. That's bad news then. Honestly, I'm not sure what to suggest - you could check that the states of the BOOT/CHPD pins on the ESP8266 go up and down as you'd expect - but if they do then the ESP8266 seems to be toast (somehow!).
What's
E.getAnalogVRef()
after running the code in the last post?Is it a bad idea to attach the LED strip directly to those pins?
Not especially - those pins are connected straight to USB's 5V. It's just that if the voltage is dropping that low, the PC is struggling to supply enough power (but that seems unlikely if it's 10 neopixels - give the voltage drop I thought you might have 50 to 100!).
Stupid question: Have you tried a different Micro USB cable? It could just be a dead cable that's unable to supply enough power even for the WiFi on the Espruino WiFi to boot.
-
• #7
OMG, I was about to try to desolder the ESP8266 and replace it with another one I had when I thought to give it one more go. And yeah guess what, it worked :D
I have no idea what did the trick. Very frustrating that I have no idea what the issue was :)
But it works! That's the most important thing. Thank you very much for looking into it!
I'll try to write down all steps with all source files in an instructable and share the link.And then buy more espruinos and have more fun with them ;)
1 Attachment
-
• #8
Glad you sorted it - and that looks amazing! So it's side-lit, encraved acrylic panels? I can't wait to see the instructable!
My money is on a dodgy Micro USB lead now - so if you have troubles again maybe try that as a first port of call. I've lost count of the number of times dodgy USB leads have been the cause of problems (although usually it's broken data lines rather than power!).
-
• #9
Sorry for bringing this up again but it was still bugging me :)
I keep getting this error from time to time and it keeps me from finalising the project.
When I have the error, the board is unusable for some time and after a lot of trail and error it works again.But last weekend I think I might have found what the cause of the error is. So I want to check with you if this could be possible.
When I unplug the USB and the ESP is in the middle of doing something (?) it gets 'locked' with the error. Now I added a wifi.disconnect() after I requested my data.
I first did some tests with the wifi.disconnect on button click just before I disconnect the USB and since I'm doing that the board and ESP boot without any issues.So I really hopes this solves my issue :)
-
• #10
Is it possible that you're hitting this issue? http://www.espruino.com/Troubleshooting#i-typed-save-but-espruino-won-t-work-or-stops-working-quickly-when-powered-from-a-computer-it-only-works-from-a-usb-power-supply-battery-or-the-computer-when-the-web-ide-is-running-
To do with print statements when plugged into USB but no terminal app is running?
Also, how are you powering the Espruino WiFi if you can plug/unplug USB? It's possible that if you're using much above 5v to power it, you can get the voltage regulator so hot that it shuts down?
-
• #11
I don't think it's that, because it happens in both situations. It doesn't matter if it's connected to USB adapter or PC with Espruino IDE running.
When I have the wifi error, the board works without any issues, I just can't get the wifi to work.
When everything is working normal again, I see the red power up flash and instantly the blue flashing from the ESP connection.The main power sources I'm using are the USB hub connected to my macbook, a standard USB hub adapter with a power source and an old USB charger.
It looks like the error is not happening when I'm sure the wifi connection is closed each time I disconnect the USB . But that could be a coincidence as I have no idea what's going on :)
I was running some code on the Espruino Wifi without any issues, but suddenly after reconnecting my Espruino to the WebIDE I get this error.
I tried resetting and flashing my Espruino, removing all local code, clearing the cache, uploading something else but nothing changes. It's like the Wifi module is in some kind of locked state.
I have no idea how to fix it. I hope anyone else could help me?
This is the code I use to connect to my Wifi