I have tried using code above and similar from M5Stack repo. I changed the pin assignments to 19 and 22, which works fine on an alt. setup with Atom Lite, Env I hat, and Atom Mate.
Using the setup below:
Atom Matrix
Env II hat
Atom Mate
I get this error and continuous reset loop.
[ 913][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
If I pull out the hat, I get a warning via the code that it is disconnected. I know the origin of this post was from long ago, but I can't think what could be causing it. Is there any difference between Env II unit and Env II hat? Any other thoughts welcome.