One of the more popular projects i build with kids is my Arduino Morse radio, so i started to wonder whether the nRF24L01 can also transmit sound. That’s how i found the excellent RF24Audio library. This library includes all basic functionality for a walkie talkie, so the sketch is extremely simple, included below.


I connected the nRF24L01 the usual way, on the SPI pins D11,D12,D13 and 2 extra: D7 and D8. The audio library works on top of the RF24 library, which i also updated to the optimised version from the same source. For maximum reach, i configured the userConfig.h file in the library folder, to the lowest speed RF24_250KBPS and a sample rate of 16kHz which should be fine for speech. I tried higher settings to transfer music, putting my phone’s headphone output on A0 but the quality was rather low; good enough to recognise the song but not pleasant to listen to (noise/distortion).

I include a basic wiring diagram below, showing the 2 LEDs and transmit button:

  • the LED on D6 goes on while a signal is received
  • the LED on the button (A1) goes on while sending
  • the MIC is an amplified electret microphone
  • the speaker is a cheap 8ohm 0.5W speaker


In this application the nRF24L01 seems to draw more power than usual, so i needed to add a large capacitor on the 3.3V line as decoupling capacitor; anything from 470uF upwards seems to work. (note: when i used an Arduino Nano for another nRF24 project it did not provide enough power at the 3.3V pin so i ended up using a separate 3.3V regulator; other solutions mentioned here).

With this simple setup, we get about 20 meters reach, or less with concrete walls in between. Enough to play with, but for a useful project you probably need an external antenna on the nRF24L01 and/or a better 3.3V supply.

The code is below (same sketch for both sides), including the printf.h file that you have to put inside the sketch’s folder, for the radio.printDetails() function to work (handy diagnostics).

/* Arduino UNO with nRF24L01 module
 * Tom Tobback Nov 2016 - BuffaloLabs
 * -press button on A1 to transmit, LED on, speak into the mic
 * -other LED goes on when receiving
 * Need large capacitor on 3.3V line
 * nRF24L01 connected to SPI D10,D11,D12 and D7,D8 
 * button connected on A1 is taken care of by library
 * LED on D6 (receiving) is taken care of by library
 * RF24 Audio Library TMRh20 2014
This sketch is intended to demonstrate the most basic functionality of the audio library.

2 Arduinos (Uno,Nano,Mega, etc supported)
2 NRF24LO1 Radio Modules
1 or more input devices (microphone, ipod, etc)
1 or more output devices (speaker, amplifier, etc)
1 or more external buttons or switches to control recording/volume/etc.

1. Change the CE,CS pins below to match your chosen pins (I use 7,8 on 328 boards, and 48,49 on Mega boards)
2. Connect buttons as desired to the button pins listed below.
2. Upload this sketch to two or more devices
3. Use external buttons to control all devices

Default Pin Selections:
Speaker: pins 9,10 on UNO, Nano, pins 11,12 on Mega 2560
Input/Microphone: Analog pin A0 on all boards

Transmit button: Pin A1
VolumeUp button: Pin A2
VolumeDn button: Pin A3
Remote Transmission: Pin A4

Note: See for info on how to wire the buttons to the pins
Note: Pin selections can be overridden by modifying the userConfig.h file included with the library

#include <RF24.h>
#include <SPI.h>
#include <RF24Audio.h>
#include "printf.h" // General includes for radio and audio lib

RF24 radio(7,8); // Set radio up using pins 7 (CE) 8 (CS)
RF24Audio rfAudio(radio,1); // Set up the audio using the radio, and set to radio number 0.
 // Setting the radio number is only important if one-to-one communication is desired
 // in a multi-node radio group. See the privateBroadcast() function.

void setup() { 
 Serial.begin(115200); // Enable Arduino serial library
 printf_begin(); // Radio library uses printf to output debug info 
 radio.begin(); // Must start the radio here, only if we want to print debug info
 radio.printDetails(); // Print the info
 rfAudio.begin(); // Start up the radio and audio libararies

// rfAudio.transmit();
 rfAudio.setVolume(7); // max vol

void loop() {
 // Audio playback and button handling is all managed internally.
 // In this example, the radio is controlled by external buttons, so there is nothing to do here

/* Documentation and References:

All Library documentation:
New (2014) RF24 Audio Library:
Optimized (2014) RF24 Lib Source Code: 
Optimized (2014) RF24 Network Lib:


And the printf.h file:

 Copyright (C) 2011 J. Coliz <>
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 version 2 as published by the Free Software Foundation.
 * @file printf.h
 * Setup necessary to direct stdout to the Arduino Serial library, which
 * enables 'printf'

#ifndef __PRINTF_H__
#define __PRINTF_H__

#ifdef ARDUINO

int serial_putc( char c, FILE * ) 
  Serial.write( c );

  return c;

void printf_begin(void)
  fdevopen( &serial_putc, 0 );

#error This example is only for use on Arduino.
#endif // ARDUINO

#endif // __PRINTF_H__

49 thoughts on “Arduino walkie talkie with nRF24L01

  • 16/11/2016 at 22:13

    first great project, i want to give it a try.
    but quick question do you upload the same sketch to both Arduinos?
    do you know if a pro-mini would also work?

    • 18/11/2016 at 07:59

      Hi, yes same sketch goes on both Arduinos. i assume a ProMini will also work, it’s the same atmega328 chip.

      • 15/08/2018 at 13:32

        can we connect 8 to 10 walkie talkie to gether for sqaud conversation ?
        plz rply

        • 10/09/2018 at 08:50

          hi, yes if you don’t set the channel you will have broadcast so anybody can hear. however, as i mentioned in the post, the reach of these standard radio modules is quite poor for this application, about 10-20 meters or so, so you will probably have to improve that if you want it to be useful. i’m not sure what you can get with 2.4GHz, it would make more sense to use a lower frequency module.

  • 06/01/2017 at 23:31

    is there any beep noise while talking with this walkie talkie ?
    i have it. a bad beep during talk into my walkie talkie.
    how can i fix it ?

    • 07/01/2017 at 09:28

      i don’t remember any beeping sound; are you using an amplified electret microphone similar to mine?

  • 14/01/2017 at 18:22

    imy girlfriend has tow arduino uno r3. are these good for this project ?
    i wanna make another walkie talkie for her.

  • 14/01/2017 at 18:29

    Sorry. those arduinos are Mega. is it good for ?

    • 16/01/2017 at 07:49

      Yes Mega will work too, just need to use other pins for the speaker as mentioned in the top section of the code: pin 11 and 12

  • 15/01/2017 at 16:22

    Hi. what about pin number 8 on nRF24L01 ? where should be connect ?

    • 16/01/2017 at 07:53

      pin 8 (IRQ) not used for this application

  • 18/01/2017 at 00:12

    I have one leonardo and one uno. These are not working together. K
    I think because pins on leonardo are deferent. And i dont know witch one

  • 19/04/2017 at 02:23

    arduino IDE has an error.

    Arduino: 1.8.1 (Windows 10), Board: “Arduino/Genuino Uno”

    \\\\Arduino\libraries\RF24Audio-master\RF24Audio.cpp: In function ‘void __vector_11()’:

    \\\\Arduino\libraries\RF24Audio-master\RF24Audio.cpp:460:9: error: ‘class RF24’ has no member named ‘writeFast’



    exit status 1
    Error compiling for board Arduino/Genuino Uno.
    can you help me about that?

    • 20/04/2017 at 11:32

      Hi Amir, i have just tried to compile the code again in IDE 1.8.2 and it works for me. Maybe you have not installed the RF24 library from the same source as the RF24Audio? There are a few different versions of RF24, you need the one from the same author.

  • 28/09/2017 at 18:34

    hi to all
    I have a bad noise on speaker
    I work with nano arduino and lm386 amplifire
    I have a 3.7batteri li,polimer
    what I do for this problem??

    • 02/10/2017 at 12:04

      have you tried connecting the speaker straight to the 2 Arduino pins as in the example? does this give you the same noise, or is the noise only there with the LM386? the sound output uses the 2 Arduino pins, have you connected them to pin2 and pin3 of the LM386?
      do you connect the LiPo 3.7V to the Nano’s 5V? i don’t think the 3V3 regulator on the Nano is LDO so that might not work well, the 3.7V input might be too low to get a stable 3.3V. better use a separate LDO voltage regulator to get a stable 3.3V and connect this to the Nano’s 5V and also power the nRF from this line (not from the Nano’s 3V3 pin).

  • 25/10/2017 at 09:05

    Friend you did it with arduino one and in what version of arduino you did it

  • 14/11/2017 at 14:08

    You did a nice project and i suggest you to replace your hand made sketch with a Fritzing diagram. You can find it here and its free

    • 15/11/2017 at 09:40

      Hi Amit, i’m familiar with Fritzing and use it sometimes. however, i use this kind of sketches for my kids’ classes, printed on paper. Fritzing looks good on a screen, but is less ideal for printing, and i prefer the simple level of abstraction of my ‘maps’.

  • 23/11/2017 at 22:42

    Can you communicate more than two Arduinos?

    • 01/01/2018 at 16:37

      Hi Luis, if i recall correctly, i’m using the broadcast mode, not channel to channel, so the broadcast is received by all systems within reach.

  • 23/12/2017 at 00:08

    hi, the communication is bidirectional?

    • 01/01/2018 at 16:31

      yes both sides run same code and can send/receive

  • Pingback: Walkie talkie Arduino - Сайт для радиолюбителей

  • 29/12/2017 at 14:24

    Hello,we did the same things what you wrote, the circuit works but after some time(10s-2 min) we need to reset the arduinos in order to rework it. Did it happen to you? What do you think?Why did it happen? Thank you.

    • 01/01/2018 at 16:41

      Hi, Uchi, not sure why your Arduinos get stuck, my guess would be the power supply to the radio modules as mentioned in my post. so i’d suggest to use a proper 3.3V regulator to power the radio and see if that solves your issue. it may be interesting to add a diagnostic LED to the project to indicate the radio status, i’ll have a look at that.

      • 03/01/2018 at 15:25

        I have added an LED on D3 for the status, and changed the loop to this:

        if (radio.getPALevel() < 3) { Serial.println("radio error"); digitalWrite(3, HIGH); } else { digitalWrite(3, LOW); } It seems the radio fails from time to time, but then i restores itself. I'm not sure it really fails, maybe just the status command fails. But it definitely fails if the wiring is not correct. I have also added a watchdog timer with wdt_enable(WDTO_1S); in the setup. It triggers occasionally, sometimes not for 10min. I added at the end of setup: radio.setPALevel(RF24_PA_MAX); // rfAudio.begin seems to put this to PA_MIN I tested the range with a proper 3.3V voltage regulator but that did not make a difference. So the only way to get a better range i think is using a module with external antenna.

  • 27/01/2018 at 06:53

    I Rebuild this whole Circuit ans put it in 2 Boxes. Now im Facing the issue that Theres only Noise/distortion both LEDs react äß expected ans im also getting Sound when i blow at the mic just no Real speach

    • 02/02/2018 at 07:47

      Hi Stan, are you using an amplified mic pcb as in my pictures? if your using a non-amplified mic, the signal is too weak. maybe your amplifier is too strong, in that case you could put a voltage divider on its output, or a pot (GND, A0, mic output).

  • 11/03/2018 at 20:44

    Dear Tom!
    Thank you for your article.
    I would like to ask: how could it be modified to be “full-duplex”? So i mean to be two-way communication simultanously? So talking to each other WITHOUT need to press any button, just use it like a phone call?
    Thank you for your answer,

  • 15/04/2018 at 12:32

    Should i make the same connections and upload the same code to both the arduinos?
    Will it transmit and receive the sound?

    • 08/05/2018 at 14:01

      yes same code on both arduinos. press the button while speaking to transmit

  • 27/11/2018 at 08:47

    I am putting on a walkie talkie workshop at school. We will build this project. There will be several pairs of walkie talkies functioning at the same time. How do I address or set channels? I want each group to be able to have private communication without interference from the other group’s walkie talkies. I tried radio.setChannel(108); in the void setup() section. Loaded this code to both walkie talkies. This did not work for me. Any thoughts?

    thanks much

  • 27/11/2018 at 22:20

    Re: Full Duplex – the simplest way is by imitation.

    If you use a paired MCU+radio module for each half of the ‘Plex (1 pair for Rx, 1 pair for Tx), you can effectively mirror an AVR equiv to the old Pye PF1 – but by having isolated radio and audio chains, and split-frequency operation, you could set up group ops easily.
    Have Rx listening for broadcast, Tx on a lower freq or reverse if preferred.

    Repeator Mode – Then, with a bit of thought and elaboration, you could use a central repeater and all operators on portable/mobile sets. I’ll leave you to research that, but it’s neither complex or hard (that said, I’ve been involved in radio comma for half my life, so my perception of easy is relative – compared to my youth days era tech means, super easy).

    Super Advanced – with some work, you could develop a proper packet transmission based digipeater based networked repeater op.

    But regardless of how you go – your two immediate elaborations should be using either higher ERP radio modules, preferably not using PCB etched antennas, or (using low ERP or higher ERP modules), use efficient antennas – remember that your onboard etched antennas are negative gain – you’re aiming for unity gain or positive gain on the antenna front. With a little effort, you could build coax co-linears for good positive gain and still be omnidirectional or helically wound collinear at reduced positive gain efficiency.

    Remember, particularly on the Rx side, stronger (within Rx tolerance) signals directly received via efficient means beats compensating for poor passive gain via Rx preamps.

    Note – if you dig deep, you can find digital telephony/voice configured modules for ISM or permit-free allocations that all you need add is the smart bit (I.e. MCU for control and data modes, driving displays etc).

  • 01/01/2019 at 10:00

    Hi tom.
    I made the circuit. When i press the button i get some feedback on the other speaker. This means that my circuits are working. But it’s not transmitting and sound from microphone. I checked with two different microphone.

    Secondly after few seconds arduino stops working and i need to restart it.

    • 15/01/2019 at 07:33

      hi, the microphone is an amplified electret mic; it won’t work without the amplifier as the output would be to low.
      if your system gets stuck, my guess is that the 3.3V power supply is not sufficient; are you using a large capacitor on 3V3/GND?
      also, there are a lot of fake nRF24L01 modules around of varying quality

  • 23/03/2019 at 02:37

    Dear Tom,
    I would like to thank you for this article, I have a couple of questions I am thinking to do a similar project but instead of using nRF24L01 I am planning to use Arduino Ethernet Shield V1,
    so I want to record my voice in my Arduino and send it to another Arduino (in the same Room), then hear it
    do you think it’s possible to do it with the Ethernet Shield ?

  • 25/04/2019 at 21:13

    Which pins is the speaker connected to??

    • 29/04/2019 at 10:31

      it says on the drawing and in the code, D9 and D10

  • 05/05/2019 at 13:19

    Sir please can you give me all connections properly to connect present I’m working on this project I should complete this project soon so please can you give me connections with neat circuit diagram

    • 14/05/2019 at 11:16

      hi, i think the wiring diagram representing the breadboard in the picture should be clear; i build this project with 7-8 year olds and they can figure it out. just make sure you have an amplified mic board.


Leave a Reply

Your email address will not be published. Required fields are marked *