Avatar for jeffmer

jeffmer

Member since Apr 2020 • Last active Aug 2020
  • 4 conversations
  • 37 comments

Most recent activity

  • in Bangle.js
    Avatar for jeffmer

    Hi, iOS let’s you control which apps generate notifications in its Settings app. If you want notifications to appear in your phone but do not want the watch to see them, there is a Bangle settings option for the ANCS widget which lets you select the class of notifications you want to receive.

  • in ESP32
    Avatar for jeffmer

    This initialisation code seems to work - it turns the backlight on, charges the battery etc. Needs to be put into a module when time permits. You can get the battery voltage and current using batV and batA:

    I2C1.setup({scl:22,sda:21,bitrate:400000­});
    
    function init(){
        function Write1Byte(a,d) { I2C1.writeTo(0x34,a,d);}
        // Set LDO2 & LDO3(TFT_LED & TFT) 3.0V
        Write1Byte(0x28, 0xcc);  
        // Set ADC to All Enable
        Write1Byte(0x82, 0xff);
        // Bat charge voltage to 4.2, Current 100MA
        Write1Byte(0x33, 0xc0);
        // Enable Bat,ACIN,VBUS,APS adc
        Write1Byte(0x82, 0xff);
        // Enable Ext, LDO3, DCDC1
        // Close DCDC2 output
        // with out LD02 LCD light it is 0x49 
        Write1Byte(0x12, 0x4D);        
        // 128ms power on, 4s power off
        Write1Byte(0x36, 0x0C);
        // Set RTC voltage to 3.3V
        Write1Byte(0x91, 0xF0); 
        // Set GPIO0 to LDO
        Write1Byte(0x90, 0x02);
        // Disable vbus hold limit
        Write1Byte(0x30, 0x80);
        // Set temperature protection
        Write1Byte(0x39, 0xfc);
        // Enable RTC BAT charge 
        Write1Byte(0x35, 0xa2);
        // Enable bat detection
        Write1Byte(0x32, 0x46);
    }
    
    init();
    
    function batV() {
        I2C1.writeTo(0x34,0x78);
        var d = I2C1.readFrom(0x34,2);
        var v = d[0]*16+d[1];
        const ADCLSB = 1.1 / 1000.0;
        return v * ADCLSB;
    }
    
    function batA() {
        function read13(a){
            I2C1.writeTo(0x34,a);
            var d = I2C1.readFrom(0x34,2);
            return d[0]*32+d[1];
        }
        // current in - current out (ma);
        return ( read13(0x7A)-read13(0x7C))/2;
    }
    
  • in ESP32
    Avatar for jeffmer

    If you have had no problems with the Atom, it certainly looks like the AXP192 needs to be initialised. Among other things, it powers the RTC which can reset the ESP32. I plan to test some initialisation code based on the Arduino class - as @MaBe suggests - when I get a chance.

  • in ESP32
    Avatar for jeffmer

    I am beginning to suspect that it may be something to do with not initialising the AXP192 power management unit properly in the M5StickC that is causing the reset loop. The Atom does not have one.

  • in ESP32
    Avatar for jeffmer

    Will do. Did you build it yourself or get it from the latest build archive?

  • in ESP32
    Avatar for jeffmer

    Initially, mine worked for up to 5 minutes and then if I left it connected in went into a continuous reboot. Does yours stay up for a long time?

  • in ESP32
    Avatar for jeffmer

    Thanks, its currently set to 'y' so I assume you mean to set this to blank. Will try and report back. The M5StickC works well with Arduino, so I will see if I can find the sdkconfig file that they use for the pico and compare it.

  • in ESP32
    Avatar for jeffmer

    I just encountered the same problem:

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v06.10 (c) 2019 G.Williams
    Espruino is OpÿE (520) psram: ESP32PICOD4  do not support psram yet
    E (520) spiram: SPI RAM enabled but initialization failed. Bailing out.
    
    

    I cannot see find an option to disable spiram during the build except in the sdkconfig file which is generated and says DO NOT EDIT?

  • in Bangle.js
    Avatar for jeffmer

    My possibly mistaken impression was that Modules do not appear explicitly in Storage. For example, the gpsrec app uses the “graph” module which does not appear when you list files in the WebIDE.

Actions