element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Project14
  • Challenges & Projects
  • More
Project14
Show and Tell! ESP32+NRF24 based walkie talkie
  • News
  • Member Updates
  • Competitions
  • Forum
  • Documents
  • Theme Suggestions
  • Polls
  • Members
  • More
  • Cancel
  • New
Join Project14 to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Nanucek
  • Date Created: 8 Aug 2026 2:31 PM Date Created
  • Views 29 views
  • Likes 1 like
  • Comments 1 comment
  • esp32
  • engineer
  • element14
  • privacy
  • esp-now
  • nrf24
Related
Recommended

ESP32+NRF24 based walkie talkie

Nanucek
Nanucek
8 Aug 2026

ESP32 nRF24 Walkie-Talkie (Main Description)

This project is a wireless communication terminal built on the ESP32 microcontroller, utilizing the nRF24L01 2.4GHz transceiver module for data transmission. The system features a 0.96" I2C OLED display to show real-time operational status (such as current channel and transmission states) and an incremental rotary encoder with a push button for user input. Rotating the encoder adjusts the active channel, while pressing the integrated button triggers an outgoing transmission packet.

Code:

#include <SPI.h>
#include <Wire.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

#define CE_PIN 4
#define CSN_PIN 5
RF24 radio(CE_PIN, CSN_PIN);
const byte address[6] = "00001";

#define CLK_PIN 25
#define DT_PIN 26
#define SW_PIN 27

int counter = 1;
int currentStateCLK;
int lastStateCLK;
unsigned long lastButtonPress = 0;

void setup() {
Serial.begin(115200);

pinMode(CLK_PIN, INPUT_PULLUP);
pinMode(DT_PIN, INPUT_PULLUP);
pinMode(SW_PIN, INPUT_PULLUP);
lastStateCLK = digitalRead(CLK_PIN);

if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
for(;;);
}
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0, 10);
display.println("Starting...");
display.display();
delay(1000);

if (!radio.begin()) {
display.clearDisplay();
display.setCursor(0, 10);
display.println("nRF24 Error!");
display.display();
while (1) {}
}
radio.openWritingPipe(address);
radio.openReadingPipe(0, address);
radio.setPALevel(RF24_PA_MIN);
radio.startListening();

updateDisplay("RX Mode");
}

void loop() {
currentStateCLK = digitalRead(CLK_PIN);
if (currentStateCLK != lastStateCLK && currentStateCLK == 1){
if (digitalRead(DT_PIN) != currentStateCLK) {
counter--;
if(counter < 1) counter = 1;
} else {
counter++;
if(counter > 99) counter = 99;
}
updateDisplay("Channel Changed");
}
lastStateCLK = currentStateCLK;

int btnState = digitalRead(SW_PIN);
if (btnState == LOW) {
if (millis() - lastButtonPress > 500) {
sendData();
lastButtonPress = millis();
}
}

if (radio.available()) {
char text[32] = "";
radio.read(&text, sizeof(text));
updateDisplay(text);
}
}

void sendData() {
radio.stopListening();
char text[32];
sprintf(text, "Ping Ch: %d", counter);

if (radio.write(&text, sizeof(text))) {
updateDisplay("TX OK");
} else {
updateDisplay("TX Fail");
}

radio.startListening();
}

void updateDisplay(String statusMsg) {
display.clearDisplay();

display.setTextSize(2);
display.setCursor(0, 0);
display.print("CH: ");
display.print(counter);

display.setTextSize(1);
display.setCursor(0, 30);
display.print("Status: ");
display.println(statusMsg);

display.drawLine(0, 50, 128, 50, WHITE);
display.setCursor(0, 55);
display.print("Press SW to TX");

display.display();
}

  • Sign in to reply
  • cstanton
    cstanton 4 hours ago

    Do you have any photos or videos of your project Nanucek ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube