Avatar for Robin

Robin

Member since Jan 2017 • Last active Aug 2017
  • 11 conversations
  • 109 comments

Most recent activity

  • in Pico / Wifi / Original Espruino
    Avatar for Robin

    I guess we weren't shouting loud enough!!

    You can change it to Serial1.setConsole(true);

    Now that we are shouting "we really mean it" ref true code now behaves as expected.

    I should have checked the documentation: http://www.espruino.com/Reference#l_Seri­al_setConsole

    Thank you @Gordon for staying here until it was resolved. I know it's now late where you are, and I appreciate being able to put this to rest before the end of both our days. Unless you are pulling an all-nighter, I still have six hours of play time with Time Zone difference. ;-)

  • in Pico / Wifi / Original Espruino
    Avatar for Robin

    Your explanation was helpful and added clarification to the troubleshooting section @Gordon.

    I modified onInit() and removed E.on('init' and now have another peculiar scenario.

    Verified nothing connected to B6 ,B7


    function onInit() {
    
      Serial1.setConsole();
     
      // Power up delay waiting for device to settle 
      setTimeout( function() {
    
        startSequence();
        
      }, 9900 );  
    }
    


    By adding a rather long timeout shy of ten seconds, I see how the console.log() statements are now not visible (as expected). However, now the reset button on the Pico is in-effective as Red LED doesn't illuminate or flicker ever. But, when the IDE is re-connected as in a disconnect re-apply power to the USB cable then re-connect, the left pane starts filling up with the console.log() statements and the Pico starts to be happy again. This requires the IDE to be connected, not what I desire.

    It's troubling that a hard reset doesn't perform a reset. Hard disconnect of cable does then flash the Red LED as expected, and RESET then works as expected.


    Ref:

    Of course the problem with that is that none of your print statements will be readable by the user

    console.log() statements only intended to be visible during development and not required stand alone, so okay there.

  • in Pico / Wifi / Original Espruino
    Avatar for Robin

    Tue 2017.08.08
    @Gordon Thank you for the near immediate response. Yes using save() and USB.setConsole()

    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() {
      //console.log("Hello World!");
      onInit();
    });
    
    function onInit() {
      startSequence();
    }
    
    var startSequence = function() {
    
      setTimeout( function() {  
        
        console.log("inside startSequence() setTimeout()");
        // tons of console.log() comments here and in other functions    
        clearLEDAll();
    
      }, DURATIONTest );
    }
    
    var clearLEDAll = function() {
    
      setTimeout( function() {  
        
        console.log("inside clearLEDAll() setTimeout()");
        // tons of console.log() comments here and in other functions    
    
      }, DURATIONClear );
    }
    


    Am wondering though if I should have say a five second delay timer on start up.


    UPDATE: Nope that didn't work and also tried moving USB.setConsole() inside init
    Not expecting anyone to debug this code, but I could u/l the entire file. Will need
    a couple of days to prettify the thousand lines though.

  • in Pico / Wifi / Original Espruino
    Avatar for 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.

  • in Puck.js
    Avatar for Robin

    Thank you for the attempt @Gordon. Still plagued with 404 and github seems to know about it:

    https://twitter.com/githubstatus

    When I was able to get a valid page, still get the "No Bluetooth devices found" error.

    Will give it a couple more tries, thank you for staying in touch . . .

  • in Puck.js
    Avatar for Robin

    Mon 2017.08.07

    @Gordon,
    Thank you for checking. Wanted someone with skills to validate what was supposed to be seen.

    Capitalisation matters

    Being picky here, as there isn't any capitalization in that link ;-)

    Just did a check and the site now loads fine. Maybe there was an update in progress?

    However, changed the manifest file, ran the register.cmd manager. Extension Icon appears in upper right of Chrome. d/l .zip unpack and used unpacked files using 'Choose File' buttons

    Running that page now gives error a device not found error:

    "Status: DFU failed: NotFoundError: User cancelled the requestDevice() chooser.). Check console for details."

    Opening the Javascript console didn't provide any additional detail

    urish.github.io wants to pair "No Bluetooth devices found"

    Is there a laptop configuration I may have missed? Or do I have to 'unpair' the laptop::puck

    Being extra careful in Windows10 Settings and Bluetooth connections

    You did preface this task with may work . . . .

  • in Puck.js
    Avatar for Robin

    Mon 2017.08.07

    @Gordon,
    Thank you for the re-visit correction. My posting here was more to assist @user80065 as there were several posts and no 'experts' were responding. Just wanted to pass along that I had observed the same omission issue so that user wasn't pulling hair for no reason.

    Ctrl-click the reload button - that should force a full reload of the IDE

    Verified that Ctrl-click did in fact load the new instance and the Relay Key edit entry field is now accessible. This should help user80065 if they follow the instructions in post #1 above.

    Android device update: Acquired a Kindle Fire HD which runs sideloaded Android apps. Sadly, the relay app does execute there, but the Bluetooth only detects my laptop but is unable to discover the Puck. Am making the assumption that the Kindle is not good at BLE. Still working on smart phone acquisition.

  • in Puck.js
    Avatar for Robin

    @user80065,

    I agree with you that in step #1 for the PC side that it is written
    https://www.espruino.com/ide/
    and that the 'Relay Key' edit field is not present there.

    Maybe @Frida is trying to imply that https://www.espruino.com/ide/relay/ is used on both ends perhaps, and that step #1 has 'improved' since five months ago?

    Such that the relay link-app is used to pair the two, then use https://www.espruino.com/ide/ to access perhaps?

    The input field is under Settings >> Communications>>Relay Key:: (Last Entry)
    as Frida indicates.

    My outbound BLE device can't connect, so I am unable to test this idea on PC side.

Actions