• Hey guys, unfortunately - Gordon was right - without me clearly knowing what I had changed to fix it - it returned to it's previous power consumption. I did get an oscilloscope, but unfortunately no current probe (I have a shunt resistor, but have no differential probe, so have not tried reading it yet). I did get an analog meter as well, and it gets the same power reading.

    @Gordon, here is my current code on the device:

    pinMode(A0, 'input_pulldown');
    A13.read();
    
    setSleepIndicator(LED1);
    
    function doStuff() {
      console.log("doing stuff");
    
      setTimeout(function(){
          console.log("Going to sleep again");
          setDeepSleep(1);
        }, 500);
    }
    
    setWatch(function() {  
      console.log("A0 pressed");
      doStuff();
    }, A0, {repeat: true, edge: 'rising', debounce: 10});
    
    console.log("Going to sleep");
    setDeepSleep(1);
    

    @Robin, seems reasonable to explicitly set the pinmodes: pinMode looks like it can be all of these: analog', 'input', 'input_pullup', 'input_pulldown', 'output', 'opendrain', 'af_output' or 'af_opendrain'.

    These are the pinModes I expect to set, what would you recommend the others be set to:

    pinMode(A0, 'input_pulldown');
    pinMode(A1, 'input_pulldown');
    A13.read();
    

    The pins I expect to set are: A4, A5, A6, A7, B0, B1, B3, B4, B5, B6, B7, B8, B9, B10, B13, B14

    Best,
    Narath

About

Avatar for narath @narath started