Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ESP32-audioI2S
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ESP32-audioI2S
Commits
21847629
Unverified
Commit
21847629
authored
Oct 28, 2018
by
Wolle
Committed by
GitHub
Oct 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first release
parent
5668ee1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
PlayMP3fromSDviaI2S.ino
PlayMP3fromSDviaI2S.ino
+40
-0
No files found.
PlayMP3fromSDviaI2S.ino
0 → 100644
View file @
21847629
#include "Arduino.h"
#include "audioI2S/Audio.h"
#include "SD.h"
#include "FS.h"
// Digital I/O used
#define SD_CS 5
#define SPI_MOSI 23
#define SPI_MISO 19
#define SPI_SCK 18
#define I2S_DOUT 25
#define I2S_BCLK 27
#define I2S_LRC 26
Audio
audio
;
void
setup
()
{
SPI
.
begin
(
SPI_SCK
,
SPI_MISO
,
SPI_MOSI
);
Serial
.
begin
(
115200
);
SD
.
begin
(
SD_CS
);
audio
.
connecttoSD
(
"320k_test.mp3"
);
audio
.
setPinout
(
I2S_BCLK
,
I2S_LRC
,
I2S_DOUT
);
audio
.
setVolume
(
21
);
// 0...21
}
void
loop
()
{
audio
.
loop
();
}
// optional
void
audio_info
(
const
char
*
info
){
Serial
.
println
(
info
);
}
void
audio_id3data
(
const
char
*
info
){
//id3 metadata
Serial
.
println
(
info
);
}
void
audio_eof_mp3
(
const
char
*
info
){
//end of file
Serial
.
println
(
info
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment