Can't make board work after unplug/reset. #3575
Replies: 6 comments
-
Posted at 2014-02-02 by Dorantor Actually, I was unable to take "off the grid" also this example: http://www.espruino.com/Control+LED+with+Button (last code block) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-02-02 by zone11 I have the same problem, simple to reproduce. reset the board, an add this code "setInterval("digitalWrite(LED1,l=!l);",200);"
after "save();" and a reboot I got this code:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-02-03 by @gfwilliams strange. Can anyone else reproduce this? I just tried with 1v48 for the website and it works fine. HoweverWhat Dorantor is seeing might be to do with the fact that it's plugged into a PC. Could you try just plugging into a USB wall socket? (or even just starting a terminal app). The problem is this: When Espruino isn't plugged into a computer, it knows and every time it wants to write something to the console (like the welcome message) it just throws it away because it knows nobody is listening. However when you're plugged into a computer it knows it is connected, and it waits patiently trying to send data but because there is no terminal app open on the computer, the computer isn't accepting it. It's a bit difficult, because in some cases it would be really annoying if Espruino just 'lost' data that you'd tried to output. I'll try and tweak it so that at least the welcome message doesn't stop it from working. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-02-03 by Dorantor If I connect board to a USB wall socket - everything works fine. So, you're right about the roots of this issue. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-02-04 by @gfwilliams Yesterday I made some changes (that'll be in the next Espruino version) so that the output buffer is a bit bigger, and if Espruino loads from flash it doesn't output the Espruino logo. That means that your problem will go away, but that if you do:
Then Espruino will still stop working after a while. I'm planning to do some work on flow control with the USART, so hopefully I'll roll an option for setting USB flow control into those changes. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-02-08 by zone11 With firmware v50 the problem losing code is solved for me. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-02-02 by Dorantor
Just received my board. While I was playing inside WebIDE everything was fine. Until I tried to run my board "off the grid". So, what I did.
I've updated my v43 firmware to v48 using WebIDE. Wrote small program to blink LEDs:
https://gist.github.com/dorantor/9be4206404f69683c203
(Initially it was w/o button code)
So, I put this code into right panel, click "Send to Espruino", switched to left panel, typed "save();" hit enter.
After my Arduino background I expected that if I unplug USB cable, go to my friends PC, and plug it in, program will start from beginning. But it doesn't happen. Obviously, there is some error in my workflow, but I can't figure out what am I doing incorrectly.
Beta Was this translation helpful? Give feedback.
All reactions