Go Down

Topic: New Library: RF24Audio - Realtime Audio Streaming, Multicasting and More (Read 41781 times) previous topic - next topic



i have found this interesting modul /http://www.mikroe.com/add-on-boards/audio-voice/audio-codec-proto//

maybe it would be easier to use like Teensy. What do u think ?
Do you think that  for sample rate 24 bit/44 kHz or more is Aurduino Uno too slow ?


If you just want a personal audio player, I would recommend an MP3 shield or something. 



no  :~
I would need audio stream in good (or better quality) so i thought 24b/44.1 kHz woulbe be OK with this gadget.
Maybe i am little bit curious, but when u r going to realease code for Teensy 3.1 and Teensy3 audio modul ?


best regards



Unfortunately I don't have any direct plans or timeframe in mind as to ARM board support.


Sep 30, 2014, 03:23 am Last Edit: Sep 30, 2014, 03:28 am by FerDensetsu Reason: 1
What kind of transistor and capacitor are you using in the pre amp circuit in order to input audio from your phone? A BC337 and 10 uF capacitor will work fine for this? Sorry for the noob questions, but I'm kinda new to electronics.


Well, I'm honestly not exactly sure which components I used, although the type and values of the transistor and capacitor are not super important, but will affect sound quality and volume. I'm no expert myself, but it looks like I grabbed a 2n5551 transistor for the pre-amp. I think the value of cap was somewhere from 1-10uf, but again, it should work with many general purpose transistors and a range of capacitor sizes. Because I'm not an expert here, I find that its usually best to try a few different values of resistors and capacitors to get the best results with your chosen transistor. 


OK, thanks a lot. I'm gonna try with a BC337 and see the results  :D


Hello i seen the images from your post http://tmrh20.github.io/RF24Audio/Setup.html i don't have microphone yet but can i use like a mp3 player for now to test maybe some music  to go out while the rest of it listens? and use another mp3 player on the second innercom to transmit to the first one? into i can get microphone for  to talk in voice?  second thing is i got the library but so many sketches which one is to make it transmit and receive as a innercom?


You can find the RF24 library here https://github.com/TMRh20/RF24/archive/master.zip
The RF24Audio library is here https://github.com/TMRh20/RF24Audio/archive/master.zip

Install the libraries if not installed already,
Then, in Arduino IDE do:
File  > Examples > RF24Audio > GettingStarted

The getting started sketch is a good place to get started. Pretty much every sketch will make it work as an intercomm, since the library transfers digital audio.

You may need a pre-amp circuit as shown in this thread if using an MP3 player for input/testing.


Oct 03, 2014, 06:21 am Last Edit: Oct 03, 2014, 07:48 am by josephchrzempiec Reason: 1
Hello did you use any resistors between the speakers and the digital pins. and the push buttons to transmit and volume up and down? i try to compile it from the getting started sketch and i get

C:\Users\BigGreen\Desktop\arduino-1.0.5-r2\libraries\RF24Audio\RF24Audio.cpp: In function 'void __vector_11()':
C:\Users\BigGreen\Desktop\arduino-1.0.5-r2\libraries\RF24Audio\RF24Audio.cpp:460: error: 'class RF24' has no member named 'writeFast'


Oct 03, 2014, 08:26 am Last Edit: Oct 03, 2014, 08:44 am by josephchrzempiec Reason: 1
okay my  arduino program was messing up it compile now and when   on both arduinos i got one to tramsit button my mp3 player on it  for transmitting  and a second one for receiving with a speaker on it i hooked it up as in your wiring and used the get started sketch but i here nothing coming from the receiving side i see the led lights up  on the receiving side blinking randomly fast when i hit the transmit button  but that's all how come no music?

this is what i got from the receiving side in the serial monitor

Code: [Select]

RX_ADDR_P0-1 = 0xabcdabcd71 0x544d52687c

RX_ADDR_P2-5   = 0x3c 0xc4 0xc5 0xc6

TX_ADDR    = 0xabcdabcd71

RX_PW_P0-6    = 0x20 0x20 0x20 0x00 0x00 0x00

EN_AA    = 0x00

EN_RXADDR  = 0x06

RF_CH    = 0x4c

RF_SETUP    = 0x07

CONFIG    = 0x0e

DYNPD/FEATURE = 0x00 0x00

Data Rate    = 1MBPS

Model  = nRF24L01+

CRC Length    = 16 bits

PA Power    = PA_MAX


what am i missing to make the audio work?


Well that is a good sign, if the LED is showing different activity when transmitting, then it should mean you are receiving the audio. The first thing to do is try raising the volume on the receiver using a button or via code (see the gettingStarted sketch)

Next, check connections. On Uno, the speaker should go to pin 9 and ground, or pins 9 and 10. On Mega, pins 11,12 respectively, so double check those connections. You can also connect an LED to the speaker pins to see visually if there is any activity there.

If you still have no sound from there, you can try opening up the userconfig.h in the RF24Audio library folder, in a text editor, and un-comment the line #define speakerTX. After this, re-upload the sketch to the transmitter, and try connecting the speaker directly on the transmitter. This will tell you if the transmitter is processing the audio correctly prior to sending, and where the problem is at.


Oct 03, 2014, 11:15 am Last Edit: Oct 03, 2014, 11:24 am by josephchrzempiec Reason: 1
hello i get some sound now i can here something but it's really bad like static but i can somewhat make out the song I'm listen to and that's all not clear at all. i even tried a amp speakers i used for testing with power amp speakers same thing.

this is how i have the transmitter setup. A0  to + on the mp3  and GND to the - on the mp3 player for transmitting  and receiver haves D9 for the + on the speakers and D10 for the for the - on the speakers.

i did a audio recording form my pc mic sense my cellphone is dead i forgot to charge it i can't do a video and show it but here is what it sounds like.



It sounds like a problem with the input levels. With the mp3 player, you most likely need a pre-amp. If you follow my previous instructions, I'm willing to bet it would sound the same when you hook a speaker up directly on the transmitter.

Go Up