The SAMD 21 (the microcontroller on your Arduino board) can communicate with the SARA U201 (the GSM module on your Arduino board) using the I2S bus. This means that you can send audio data from the micro controller to the module! In such a way you can reproduce for example a wav file over a phone call as we will show in this tutorial.
You have to consider that the I2S bus is the same that is present on the headers so if you use it to communicate with the module you can't use the same pins in your project. In particular you can't use:
How it works
The operating principle of this tutorial is very simple: every time a phone call is received, the boards answers the call, plays the chosen .wav file and when it is finished it hangs the call.
The setup to use this code is very simple. You just have to:
- format your SD card in FAT16 or FAT32 format;
- load the .wav file on the SD card;
- plug your MKR SD Proto Shield on top of your board;
- plug the antenna into the board;
- plug a micro SIM card into your board;
- plug the battery into the board;
- plug the micro USB cable and connect it to your PC;
- load the code on the board using the Arduino Java or Web IDE;
- call the board and enjoy!
This example is based on the Arduino Sound library and the Arduino GSM library.