ESP32 use RF24Audio

Hello,

I like to make a communication between multiple ESP32, to stream Audio like a walki talki. But something with the library, doesn't work

The code:

#include <RF24.h>
#include <SPI.h>
#include <RF24Audio.h>
#include <LibPrintf.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

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
}

void loop() {

    if(Serial.available()){                                           // Receive and analyze incoming serial data
        switch(Serial.read()){
            case 'r': rfAudio.transmit(); break;            // Send an r or an s over serial to control playback
            case 's': rfAudio.receive();  break;
            case '=': rfAudio.volume(1);  break;                      // Control volume by sending = or - over serial
            case '-': rfAudio.volume(0);  break;
        }
    }
    Serial.println("test");
    delay(1000);
}

The outbut by compiling:

WARNUNG: Bibliothek RF24Audio behauptet auf avr Architektur(en) ausgeführt werden zu können und ist möglicherweise inkompatibel mit Ihrem derzeitigen Board, welches auf esp32 Architektur(en) ausgeführt wird.
In file included from C:\Users\username\Documents\Arduino\rf24_send_hello\rf24_send_hello.ino:3:0:
C:\Users\username\Documents\Arduino\libraries\RF24Audio/RF24Audio.h:134:9: error: 'void TX()' redeclared as different kind of symbol
 void TX();
         ^
In file included from C:\Users\username\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:185:0,
                 from sketch\rf24_send_hello.ino.cpp:1:
C:\Users\username\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\variants\esp32/pins_arduino.h:14:22: note: previous declaration 'const uint8_t TX'
 static const uint8_t TX = 1;
                      ^
In file included from C:\Users\username\Documents\Arduino\rf24_send_hello\rf24_send_hello.ino:3:0:
C:\Users\username\Documents\Arduino\libraries\RF24Audio/RF24Audio.h:141:9: error: 'void RX()' redeclared as different kind of symbol
 void RX();
         ^
In file included from C:\Users\username\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:185:0,
                 from sketch\rf24_send_hello.ino.cpp:1:
C:\Users\username\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\variants\esp32/pins_arduino.h:15:22: note: previous declaration 'const uint8_t RX'
 static const uint8_t RX = 3;
                      ^
C:\Users\username\Documents\Arduino\rf24_send_hello\rf24_send_hello.ino: In function 'void setup()':
rf24_send_hello:12:16: error: 'printf_begin' was not declared in this scope
   printf_begin();               // Radio library uses printf to output debug info  
                ^
exit status 1
'printf_begin' was not declared in this scope

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.