Avatar for Robin

Robin

Member since Jan 2017 • Last active Oct 2017
  • 11 conversations
  • 116 comments

Most recent activity

  • in Pico / Wifi / Original Espruino
    Avatar for Robin

    Mon 2017.08.28

    @user80719,

    Using this diagram http://www.espruino.com/Pico#otherpins

    and plugging in the USB cable:

    1) What is the voltage between pin 1 GND and pin 2 VBAT
    2) What is the voltage between pin 1 GND and pin 3 3.3

    Remove the USB cable:

    Place your 9v power in on pin 18 BAT_IN and perform the same test as above:

    3) pin 1 GND and pin 2 VBAT
    4) pin 1 GND and pin 3 3.3

    Schematic at:
    http://www.espruino.com/Pico#-a-name-pow­er-a-power-and-the-fet-b0-jumper

  • in ESP32
    Avatar for Robin

    Thank you for posting a more legible sample. Allows for easier cut-n-paste

    I originally thought I spotted a case typo, but double checking the online reference proved otherwise.

    Anyone else able to chime in?

    Are lines 11 and 13 actually printing what is shown as a comment or are the comments leftover from the sample?
    Do you get the same error when commenting out lines 2 and 6,7,8,9
    What is the current version of Espruino?

  • in Pico / Wifi / Original Espruino
    Avatar for Robin

    @user80719,

    I'll start with the obvious,

    1) You are certain the battery terminals are connected appropriately; [plus - BAT_IN] [minus - GND]
    2) The battery is fully charged and has been tested on a separate circuit under load.
    3) The USB cable has been removed from the Pico.
    4) What is the measured volatage at the positive terminal/BAT_IN of the 9v after it is connected?

    "It is the answers, not the questions, that are embarrassing." Helen Suzman

    5) Is 'save()' being typed before dis-connecting the USB cable and applying the 9v battery?
    6) If the battery is removed and USB cable re-applied does Pico execute the LED1 routine as expected?
    7) Are the battery wires soldered in place or using a breadboard?

    Posting an image of your connections/layout would assist greatly.

  • in Electronics
    Avatar for Robin

    Thank you Kari @user80672, your explanation clarifies you understand which module will do what.

    Although I don't have practical experience with the USB host controller, your plan appears sound to me.

    Are you at a point where you are comfortable in creating a communication language between the two devices, or are you still searching for modules that may cut down on development time? I think it would be a challenge and a load of fun creating a language for the robot. Something unique and one could be proud of when done.

    As a thought would you post 'as you go' pictures in the 'Projects' forum
    http://forum.espruino.com/microcosms/139­/
    so that new members can get some ideas based on your efforts? Would love to see the progress at each step.

    Good luck and have fun!!

  • in ESP32
    Avatar for Robin

    @user80339,

    " none of the following works as is shown in the example. "

    It appears the snippet is reading and writing to a file as expected, but the snippet is not identical to the code example at http://www.espruino.com/ESP32

    Would you please post your code in it's entirety as one legible code block so that we may determine the differences between that shown in the above page and that in the snippet that is proving difficult.

  • in Electronics
    Avatar for Robin

    Hello Kari @user80672,

    To clarify, which Espruino board are you intending to use? ref #1 above

    "I would like to make a robot with a Espruino board . . . "

    Will you be using I2C to communicate with the Espruino board? Is this what you had in mind?
    http://www.hobbytronics.co.uk/ps3-ps4-co­ntroller-bluetooth



    Make sure the Bluetooth adapter supports BLE if communicating with the Puck.

    This article implies ver 4.1 is required for BLE: http://noahklugman.com/talks/ble_present­ation.pdf

    p.5 "But: not backward compatible with Bluetooth Classic (including Bluetooth 4.0 Classic)"


    but, . . .

    " then something like Puck.js could communicate directly with them over BLE. " #2 above

    @Gordon Does the Puck support Bluetooth LE 4.0 ? (yes?) - BLE 4.1 ? (?)

    Features section doesn't specify, but both references are used on the page
    http://www.espruino.com/Puck.js

    and to add to the confusion wikipedia indicates 'Bluetooth_4.1'
    https://en.wikipedia.org/wiki/Bluetooth_­Low_Energy
    https://en.wikipedia.org/wiki/Bluetooth#­Bluetooth_4.1

    This helps in Bluetooth version clarification
    https://www.quora.com/What-are-the-main-­differences-between-Bluetooth-4-0-4-1-an­d-4-2-in-the-Layers-Baseband-LMP-L2CAP-a­pp-Layer

    " The job of Bluetooth 4.1 is to drive the ‘Internet of Things’ "
    " Bluetooth 4.1 devices can act as both hub and end point simultaneously "

  • 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.

Actions