Is my Espruino sleeping? #1053
Replies: 12 comments
-
Posted at 2020-06-12 by AkosLukacs Check http://www.espruino.com/Troubleshooting#i-typed-save-but-my-connected-device-doesn-t-work-at-power-on Do you have any |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-13 by @gfwilliams As @AkosLukacs says that's most likely the problem. Other things to watch out for:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-13 by Coder2012 So i've read the docs and I do indeed have console logs in my code, so my plan is to remove those, but I've somehow hit another issue. When I try to send code to my board i'm getting the following error.
This is odd as it has been working from the web IDE just fine recently. Here's the source. I have a raspberry pi4 running nodered which reads sensors around the house, some of these send data via MQTT which i'm picking up with the Espruino Wifi.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-13 by Coder2012 I'm also unable to update to Error Flashing: Can't find STM32 bootloader. Make sure the chip is reset into bootloader mode by holding down BTN1 while pressing RST. Is there a way I can hard reset on Espruino Wifi? I'm running into a few issues lately. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-13 by @allObjects Putting all you code into Unfortunately then calling Replace the You still may run into issues if there is too much in Only the startup of your code - especially when it deals with communication - has to be in the I'm sure you read simple explanation how to save code that espruino run on start?. (Even though Epruino has now more options to overcome issues of that sort of, the core has not chanted at all and is still very applicable.) Looking forward to hear from you! - ao |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-13 by @allObjects Putting all into onInit() can create issues with scopes of variables. If things are defined in onInit(), I always define the variable outside. That give me the options to go mixed - global and function local scoped references. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-13 by Coder2012 Hey AO good to hear from you. I only call onInit when I'm running in the web IDE. I remove this call when I run save(); in the IDE. I must admit the various methods of saving and running code on espruino don't make a lot of sense to a regular web developer such as myself. I'll need to do some reading up on this area. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-14 by Coder2012 Ok so now I have this very simple piece of my implementation and i'm still getting this dreaded error:
All I'm doing is the following:
I really don't understand why it just throws this error when I do anything with Wifi now, this was all working the other day. Any ideas guys? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-14 by @MaBecker please share process.env output |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-15 by Coder2012 Oddly after several attempts using reset and save its started working again. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-16 by Coder2012 Ok so I've now tested this using different USB plugs, cables and computers. The result is always the same, after maybe one or two hours. The Espruino WiFi seems to stop executing, and there led that is being used for sleep indicator, starts to flicker quickly and is no longer brightly lit. Does this sound like it's trying to sleep? I even added a ping back to the raspberry pi to make sure the connection stays alive every 15 seconds. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-23 by @gfwilliams Is it possible that you'd disabled If so it'd be trying to upload code, but the previous code would be running in the background so could be using CPU time and causing the upload to fail? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-06-12 by Coder2012
All my code is in an
My project requires my device to connect to the WiFi. If my device is plugged into USB on my PC it works great and the red led is lit all the time.
If my device is plugged into a USB wall socket, it begins brightly lit. Then after a while it starts to flash on and off quickly. My code fails to execute it seems.
The led is set by the setSleepIndicator function call.
Espruino WiFi v1.05
Beta Was this translation helpful? Give feedback.
All reactions