M5Stack Core2

173 views
Skip to first unread message

staffa...@oscillator.se

unread,
Sep 10, 2021, 8:25:02 AM9/10/21
to Mozzi-users
Hi!

Has anyone got Mozzi to successfully run on a M5Stack Core2?

I can get mozzi code to compile ok, but can't figure out how to get the output to the speaker.

Cheers,

Staffan
SWEDEN

staffa...@oscillator.se

unread,
Sep 10, 2021, 5:03:23 PM9/10/21
to Mozzi-users
OK, so I think I have it figured out.

In AudioConfigESP32.h change these lines to:

// Set output mode
#define ESP32_AUDIO_OUT_MODE PT8211_DAC

// For external I2S output, only: I2S_PINS
#define ESP32_I2S_BCK_PIN 12
#define ESP32_I2S_WS_PIN 0
#define ESP32_I2S_DATA_PIN 2


According to the spec's, it's a NS4168 I2S amp.

In your code, put this at the top:

#include <M5Core2.h>

and in the setup():

M5.begin();
M5.Axp.SetSpkEnable(true);

I will experiment further.

/Staffan

staffa...@oscillator.se

unread,
Sep 11, 2021, 2:19:54 PM9/11/21
to Mozzi-users
Anothering thing: The PSRAM of the Core2 introduces a conflict. So you have to disable it in the Arduino IDE.

Also: Put M5.update() in the updateControl() function.

/Staffan
Reply all
Reply to author
Forward
0 new messages