Hardware: ESP32-WROOM
IDE: Arduino 2.3.6
Hello Again! I'm hoping for some tips on what I consider "advanced coding". The good news is; I've successfully connected
my cell phone to the ESP32, and able to read META data from locally stored MP3's, as well as YouTube streamed music.
My goal is to send the META data over USB Serial to Processing to display in a little program. The trouble is, I'm not sure how
to get the data stored at the Pointer address into a variable (array, string, etc.)? Everything I've read, and tried gives me an
error, such as:
invalid conversion from 'uint8_t' {aka 'unsigned char'} to 'char*' [-fpermissive]
I'll continue to Google/YouTube lesson my way through this, and post any resolutions. Help. Tips, and Ideas welcome!
Thank you! ![]()
#include "AudioTools.h"
#include "BluetoothA2DPSink.h"
I2SStream i2s;
BluetoothA2DPSink a2dp_sink(i2s);
char dataBT[100];
void avrc_metadata_callback(uint8_t id, const uint8_t *data){
Serial.printf("0x%x, %s\n", id, data);
//strncpy(dataBT, (char*)data, sizeof(data));
sprintf(dataBT, "0x%x, %s\n", id, data);
}
void setup() {
Serial.begin(115200);
a2dp_sink.set_avrc_metadata_attribute_mask(ESP_AVRC_MD_ATTR_TITLE | ESP_AVRC_MD_ATTR_ARTIST | ESP_AVRC_MD_ATTR_PLAYING_TIME ); //| ESP_AVRC_MD_ATTR_ALBUM | ESP_AVRC_MD_ATTR_PLAYING_TIME );
a2dp_sink.set_avrc_metadata_callback(avrc_metadata_callback);
a2dp_sink.start("META_test");
}
void loop(){
Serial.println(dataBT[0]);
// Serial.println(dataBT[arrayCount]); //use loop counter to display entire array
delay(500);
}


