Espruino Wifi - Dropped characters at runtime #4517
Replies: 1 comment
-
Posted at 2017-09-10 by KevinJ Here is the console output for debug:
Posted at 2017-09-10 by KevinJ edit: remove dupe post Posted at 2017-09-10 by @allObjects ...this seems to be a recurring issue... I'm sure you found this conversation about Espruino Serial Terminal drops characters., and you find more posts. I suspect the issue is that Espruino is already working on some code while the upload is still going on. Therefore I always and strongly suggest not to do anything directly executing, such as I don't know what board you are on, but sometimes processing resources get scarce. Another option to speed-up your upload is to make modules out of pieces of your code and stick them into the I hope this helps... I just recently made a similar app where an Espruino-Wifi is the sensor operating application, stepper motor controlling application, the Wifi Access Point, AND the http/s Web server... and it all works just perfect. Posted at 2017-09-11 by @gfwilliams I'm pretty sure it's exactly as @allObjects says... Keep all your function declarations where they are, but stick the code that does stuff (Wifi connection, OneWire) in a function called It's a bit strange I know, but it's probably what you'll have to do when you go to save code to Flash memory, because you'll want certain bits of code (like Wifi connect) to run when power is applied (in Posted at 2017-09-11 by @gfwilliams This might also help to give you some explanation: http://www.espruino.com/Saving Posted at 2017-09-25 by KevinJ Thanks for the thoughtful replies, totally cleared things up. I was just thrown off a bit by the docs. I only had a brief introduction to arduino itself, so I had totally blanked out on the lifecycle event handling on board power on and jumped right into the code. That said, I think the espruino docs themselves are a bit light on the reminders to put more than the most bare bones examples into a proper init method and make sure things are loaded. Was there a tech article that I missed that gives some advice there that I missed? If not I'd be game to try and write one out myself, are open source contributions to the docs encouraged? Posted at 2017-09-26 by @allObjects @kevinj, you are right that in the docs the simple example code doe somewhat solicit a practice that then fails on larger applications. Initially though, I'm sure @gfwilliams had in mind it would work all the way thru, because last but not least, he went thru all the hoops to save the system's state down to the configuration and active timeouts, intervals, and watches. As said, with small things and simple one-time initializations this works all just fine... Complicating the examples is not the answer, but doing nothing either. May be adding a page with multiple things that need initialization and initializations with dependencies and adding a link in the simple examples to that page would be nice. All Espruino sub projects - including the documentation - is on github... you can clone it, make additions and enhancements and ask for merge requests. May be you came across the conversation about simple explanation how to save code that espruino run on start?, where pist #8 and #18 contribaute 2 times 2 cents about code life cycle in Espruino environment. Espruino programming concept is quite different from Arduino... even though deep under the hood both work with events, but only Espruino brings it 'easy' (easier?) to understand into the application realm. Coming from Browser / JavaScript programming with interfacing with DOM and XHTML Request and Sockets, Espruiono is not much different. It is just not common place to have such a high-level and easy-going language available to deal with micro controller hardware. Posted at 2017-10-02 by @gfwilliams I think there's a bit at the end of the 'quick start' about If you find something particular that you think should change, it'd be great to get some ideas. If you want to make some edits, down the bottom of the page there's usually a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-09-10 by KevinJ
Simple programs such as blink seem to transfer and run just fine, but I'm working with some Wifi and Http code that is significantly longer and it doesn't seem to transfer correctly. Log is below. The hardware is relatively new, but it worked correctly for about a day.
Steps I've tried so far to resolve:
Environment:
Beta Was this translation helpful? Give feedback.
All reactions