Hello all! I am trying to configure two Teensy 3.6 with nRF24L01 modules to transmit wireless audio with CD quality (16 bits @ 44 kHz). The audio will be gathered from the Audio Board in the Tx and then played in another Audio Board in the Rx.
So far, what I get in the other side is lots of noise when playing audio in the Tx. I am not sure if I am sending/receiving the full packets. Can you take a look and let me know if you have any advice, please?
I am copying the variables initialized and the update functions, so I do not mess the post with the full code.
In the Tx side, inside the update() function and after initializing the radio object and its methods, I have:
In the Rx side:
So far, what I get in the other side is lots of noise when playing audio in the Tx. I am not sure if I am sending/receiving the full packets. Can you take a look and let me know if you have any advice, please?
I am copying the variables initialized and the update functions, so I do not mess the post with the full code.
In the Tx side, inside the update() function and after initializing the radio object and its methods, I have:
Code:
byte data[32];
int8_t datos[32];
audio_block_t *cosa;
cosa = receiveReadOnly(0);
radio.enableDynamicAck();
for(int i = 0; i < 32; i++){
datos[i] = cosa->data[i];
}
for(int i = 0; i < 4; i++){
radio.writeFast(&(datos[i]), 32, 1);
radio.txStandBy();
}
In the Rx side:
Code:
const int payload = 64;
uint16_t audioFull[payload];
if (radio.available())
{
for(int i = 0; i < payload; i++){
radio.read(&audioFull[i*16], sizeof(audioFull));
delay(1);
}
int16_t* bfr = queue.getBuffer();
for(int i = 0; i < payload; i++){
bfr[i] = audioFull[i];
}
queue.playBuffer();
}