Skip to content

CORRUPT HEAP error when recording wav file from I2S to SD #582

Answered by pschatzmann
Valian1324 asked this question in Q&A
Discussion options

You must be logged in to vote

I recommend to keep the following as global memory

  I2SStream i2s; // Access I2S as a stream
  File audioFile; //empty audio file object
  EncodedAudioStream out(&audioFile, new WAVEncoder()); // Access audioFile as a stream
  StreamCopy copier(out, i2s);

To analyse the issue you will need to learn how to analyse the stacktrace yourself !

https://arduino-esp8266.readthedocs.io/en/latest/faq/a02-my-esp-crashes.html

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pschatzmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants