Use of E.on init on power up - event not as expected using Pico #4490
Replies: 1 comment
-
Posted at 2017-08-08 by @gfwilliams Can you give an example of the code that's not working for you? Did you try the use of Is it just that you didn't type But as suggested by the troubleshooting, if you're printing a lot of text then you'll want to use Posted at 2017-08-08 by Robin Tue 2017.08.08 The code module is rather large and nothing out of the ordinary. So I cut down in size to get the basic idea. Stripped of declarations and comments but the gist is as follows. Nothing earth shattering and E.on('init' is as in troubleshooting section referenced above. ``` USB.setConsole(); E.on('init', function() { function onInit() { var startSequence = function() { setTimeout( function() {
}, DURATIONTest ); var clearLEDAll = function() { setTimeout( function() {
}, DURATIONClear );
function onInit() { Serial1.setConsole(); // Power up delay waiting for device to settle
}, 9900 );
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-08-08 by Robin
Tue 2017.08.08
Running 1v91 on Pico
Trying to get Pico to start executing in stand alone mode without the WebIDE connected at power up.
Attempting to create a tutorial with tons of embedded console.log() comments to allow viewer to easily follow along.
Works great when WebIDE is connected via USB cable. Trying to do this stand alone.
Have tried combinations of setTimeout(), onInit() and E.on( 'init', but code execution just doesn't start.
Exact issue as in:
http://forum.espruino.com/conversations/270412/#comment12787458
but that was back in June 2015, my guess is that updates since then should be in place.
Also referenced:
http://forum.espruino.com/conversations/295607/#comment13311361
Any ideas, example or tutorial perhaps? Thanks in advance.
Robin
UPDATE: Tried USB.setConsole() as suggested at:
http://www.espruino.com/Troubleshooting#console
also, only LEDs connected to GPIO pins nothing fancy.
Beta Was this translation helpful? Give feedback.
All reactions