Last active
January 6, 2023 02:48
-
-
Save audionerd/564c7c7997b4ab836bc67723f9dc65d3 to your computer and use it in GitHub Desktop.
Revisions
-
audionerd revised this gist
Jan 6, 2023 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ // M5Stack Core Basic + RCA Module 13.2 (PCM5102) // based on https://github.com/m5stack/M5Stack/blob/b3e801f/examples/Unit/RCA/RCA.ino #include <M5Unified.h> -
audionerd renamed this gist
Jan 6, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
audionerd created this gist
Jan 6, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ // M5Stack Core Basic + RCA Module 13.2 (PCM5102) #include <M5Unified.h> void setup() { auto cfg = M5.config(); cfg.external_spk = true; cfg.internal_spk = false; M5.begin(); auto spk_cfg = M5.Speaker.config(); spk_cfg.i2s_port = I2S_NUM_1; spk_cfg.sample_rate = 96000; // via schematic at https://docs.m5stack.com/en/module/RCA%20Module%2013.2 // LRCK 23 (G0/IIS_MK) // DIN 24 (G15/IIS_OUT) // BCK 21 (G13/IIS_WS) spk_cfg.pin_data_out = 15; spk_cfg.pin_bck = 13; spk_cfg.pin_ws = 0; // LRCK spk_cfg.stereo = true; spk_cfg.buzzer = false; spk_cfg.use_dac = false; spk_cfg.magnification = 16; M5.Speaker.config(spk_cfg); M5.Speaker.begin(); M5.Speaker.tone(661, 1000); //Set the speaker to tone at 661Hz for 1000ms } void loop() { M5.update(); delay(100); }