StickC + ENVII Hat or + ENVIII Unit reboots constantly



  • Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

    I'm getting the above error in Arduino IDE from a fresh install and device just crashes and reboots.

    I get the same with Atom-Lite, Atom-Matrix, StickC in combination with ENVII hat and/or ENVIII unit.
    I'm trying the examples from here
    https://github.com/m5stack/M5Unit-ENV/blob/master/examples/Unit_ENVIII_M5StickC/Unit_ENVIII_M5StickC.ino
    and similar for the pairings above controller to hat or unit, and it remains the same.

    macOS | Arduino Version: 2.2.1
    I did get the following message on install of M5Stick and M5Atom libraries, so I dropped back to 0.2.8
    M5StickC 0.2.9 Failed to install library: 'M5StickC:0.2.9'. No valid dependencies solution found: dependency 'M5_JoyC' is not available.
    And this message for Atom, so I dropped back to 0.1.0:
    Failed to install library: 'M5Atom:0.1.1'. No valid dependencies solution found: dependency 'ATOM-ECHO' is not available

    Then Arduino IDE identifies them as updatable, but the same error messages.
    I've also tried M5Stack instead of individual M5StickC and M5Atom libraries.

    Something is clearly troubling what should be an otherwise straightforward install.

    Update: For fun?, I tried on RPi Arduino v1. 32-bit stock libraries and used code from examples menu. Same issues. Has anyone else got original StickC and the ENVII hat and ENVIII unit sensors with working Arduino code?



  • Dropped entire M5Unit-ENV library and replaced by add library from ZIP from this fork
    https://github.com/Tinyu-Zhao/M5Unit-ENV/

    Examples tested:
    StickC + ENVIII unit
    StickC + ENVII hat
    Atom Matrix + ENVII hat (even via Atom Mate with pins switched to 19, 22)
    All working! Am I happy? Ducking ecstatic, mate.



  • Add line
    sht30.init();
    straight after Wire.begin(26, 32); // Pins 19, 22 if using Atom-Mate and hats.

    For the StickC and ENVII hat example it needs the following change as well.
    SHT3X sht30; // Changed from SHT3X sht30(0x44, 1)

    Swap the StickC library out for Atom and comment out the LCD lines, it works perfectly as well with the Atom-Lite/Atom-Matrix.

    Two lines above need changed in the examples.