Teensy Audio Library + RF24

Status
Not open for further replies.

Lena

Member
Hi! :D

I'm currently tying to make two new audio blocks for Teensy Audio Library using nRF24L01+ radio: one transmitter and one receiver. It seems to be working well when I fill the array block->data[] with known numbers (the commented part). After filling data[], block is sent to the receiver and the data is received correctly (I printed the data using a get method to check). But, when I try to use the input from the Line In, block->data[] seems to be empty. So, I cannot transmit audio. Any ideas why when using Line In it is not working? I also added decimation, which receives block, the array where the decimation result will be stored (test) and the downsample ratio. The following is my update function, from my TX block.

Code:
void AudioOutputRF24TX::update()
{
  downsample = 2;
  
  block = receiveReadOnly();
  if (!block) return;


  /*for (int i = 0; i < 128; i++)
  {
    block->data[i] = i + 1;
  }*/


  decimate(block, test, downsample);

  this->updated = true;

  __disable_irq();


  //transmitting

  radio.startWrite(test, sizeof(uint8_t) * 32);

  __enable_irq();

  //no more ownership for current block
  release(block);
}
 
same

I've been having the same problem, trying to receive data in an RF24 from a broadcasting RF24. Apparently data is sent but never received. I managed to print the RF24 status and it says, 14. Whatever that is.

HALP D: :X
 
Status
Not open for further replies.
Back
Top