With the Cortex M0 I thought the SODAQ Autonomo is a good option for digital sound recording also. Unfortunately this is not working out of the box, seems that some SAMD code is missing for the Autonomo: :-/ but after some tweaking it is now running, see the full story at:
How to
You have to add in C:\Users\[yourUserName]\AppData\Local\Arduino15\packages\SODAQ\hardware\samd\1.6.14\variants\sodaq_autonomo\variant.h
Itās not working. I placed the section on top of the main.ino file and got this error message:
C:\Users\xx\Documents\Arduino\libraries\ArduinoSound\src\AudioInI2S.cpp: In member function 'int AudioInI2SClass::begin(long int, int)':
C:\Users\xx\Documents\Arduino\libraries\ArduinoSound\src\AudioInI2S.cpp:36:8: error: 'I2S' was not declared in this scope
if (!I2S.begin(I2S_PHILIPS_MODE, sampleRate, bitsPerSample)) {
^
C:\Users\xx\Documents\Arduino\libraries\ArduinoSound\src\AudioInI2S.cpp:44:3: error: 'I2S' was not declared in this scope
I2S.onReceive(AudioInI2SClass::onI2SReceive);
^
C:\Users\xx\Documents\Arduino\libraries\ArduinoSound\src\AudioInI2S.cpp: In member function 'virtual void AudioInI2SClass::end()':
C:\Users\xx\Documents\Arduino\libraries\ArduinoSound\src\AudioInI2S.cpp:58:3: error: 'I2S' was not declared in this scope
I2S.end();
^
C:\Users\xx\Documents\Arduino\libraries\ArduinoSound\src\AudioInI2S.cpp: In member function 'virtual int AudioInI2SClass::read(void*, size_t)':
C:\Users\xx\Documents\Arduino\libraries\ArduinoSound\src\AudioInI2S.cpp:85:14: error: 'I2S' was not declared in this scope
int read = I2S.read(buffer, size);
^
exit status 1
Fehler beim Kompilieren fĆ¼r das Board SODAQ Autonomo.
Yes it worked but after placing it in the variant.h file, itās part of the board definition and Jan from SODAQ advised me also to put it in this file exactly.
I have not too much knowledge about the including logic at the Arduino IDE but it did not work in my main sketch. with the other serial plotter code.
Perhaps we can make a pull request for the official Autonomo variant.h file. So I2S would be available for all user with this new board definition file.