Go Down

Topic: I2S Slave mode (Read 133 times) previous topic - next topic

mjohansson95

Hi guys!

Trying to use my Arduino as a slave communicating through I2S with a master 32 bit ADC.

Code: [Select]
I2S.begin(I2S_PHILIPS_MODE, 24);     
int sample = 0;
char data[3];


void loop(){             
   sample = I2S.read();     

   data[0]=(sample & 0xff);
   data[1]=(sample>>8 & 0xff);
   data[2]=(sample>>16 & 0xff);

   **The data is then sent through WiFi to another unit**
}


1. How do you configure the I2S.read() to occure at the correct sample rate? By interrupt?

2. How fast is the I2S.read() command? Is it faster than reading serially?

Go Up