Arduino
#define SAMPLING_RATE 1408 /* in Hz */
#define SAMPLING_TIME_US round(1000000.0/SAMPLING_RATE) /* in microseconds */
void sampleInQ(int16_t* buffI, int16_t* buffQ)
{
for (int i = 0; i < SAMPLES; i++)
{
buffI[i] = analogRead(CH_I);
buffQ[i] = analogRead(CH_Q);
delayMicroseconds(SAMPLING_TIME_US);
}
}