HC-05 communication problem less than 1k samples/second

Hello,
The HC-05 are connected using AT commands and have a baud rate of 9600. This code below can only read 1k samples per second so we want to make it read more. We are only have to hear the beat of songs and audio but not the voices. We want to take in Audio using ADC which is sent through Bluetooth(int value) to another Bluetooth (int value). It will then go through a DAC, DAC buffer, Low Pass filter, Signal amplitude, Amplifier, DC offset then amplifier.

Master:

#include <SoftwareSerial.h>
SoftwareSerial EEBlue(10, 11); // RX | TX
uint8_t incomingAudio = 0;
void setup()
{
  TIMSK0 = 0;
  Serial.begin(9600);
  EEBlue.begin(9600);  //Baud Rate for command Mode. 
 // Serial.println("Enter AT commands!");
}
 
void loop()
{
    incomingAudio = analogRead(A0);//read voltage at A0
    EEBlue.write(incomingAudio);

}

Slave:

#include <SoftwareSerial.h>
SoftwareSerial EEBlue(10, 11); // RX | TX
uint8_t data = 0;
void setup()
{
  DDRD = 255;
  TIMSK0 = 0;
  Serial.begin(9600);
  EEBlue.begin(9600);

  //set digital pins 0-7 as outputs
}
 
void loop()
{
    if (EEBlue.available() > 0)
    {
       data = EEBlue.read();
      PORTD = data; 
    }
}

We now want to go from 1k samples/sec to more using the code below but I am not quite sure where I would implement our Slave Bluetooth read that will be outputted to PORTD.
Master:

#include <SoftwareSerial.h>
SoftwareSerial EEBlue(10, 11); // RX | TX
uint8_t incomingAudio = 0;
void setup()
{
  TIMSK0 = 0;
  Serial.begin(9600);
  EEBlue.begin(9600);  //Baud Rate for command Mode. 
 // Serial.println("Enter AT commands!");
}
 
void loop()
{
    incomingAudio = analogRead(A0);//read voltage at A0
    EEBlue.write(incomingAudio);

}

Slave:

#include <SoftwareSerial.h>
SoftwareSerial EEBlue(10, 11); // RX | TX
uint8_t data = 0;
void setup()
{
  DDRD = 0xFF;
  ADCSRA = 0;             // clear ADCSRA register
  ADCSRB = 0;             // clear ADCSRB register
  
  ADCSRA |= (1 << ADPS2); // 16 prescaler for 76.9 KHz
  ADCSRA |= (1 << ADATE); // enable auto trigger
  ADCSRA |= (1 << ADIE);  // enable interrupts when measurement complete
  ADCSRA |= (1 << ADEN);  // enable ADC
  ADCSRA |= (1 << ADSC);  // start ADC measurements
  Serial.begin(9600);
  EEBlue.begin(9600);
}

ISR(ADC_vect)
{
  PORTD = ADCH; //>> 2; //(ADCL >> 2) | (ADCH << 6);
}

void loop(){
 if (EEBlue.available() > 0)
 {
  data = EEBlue.read();
  //Serial.println(data);
 }
}

Anyway you can help? Thank you.

The first link I found said the HC-05 defaults to 38400 baud, then another link that implied some default
to 9600. Its possible to change the baud rate to 115200 by the sound of it: arduino uno - Change the baud rate of HC-05 - Arduino Stack Exchange

At 115200 you've a chance of pushing 8 bit data out at 8kSPS or similar.

MarkT:
The first link I found said the HC-05 defaults to 38400 baud, then another link that implied some default
to 9600. Its possible to change the baud rate to 115200 by the sound of it: arduino uno - Change the baud rate of HC-05 - Arduino Stack Exchange

At 115200 you've a chance of pushing 8 bit data out at 8kSPS or similar.

Default baud of an HC-05 is 9600 for normal module to module comms - 38400 for AT-command comms

Hello,
We have two hc-05's communicating via AT commands. Baud rate: 9600
We have a DAC, DAC buffer, Low Pass filter, Signal amplitude, Amplifier, DC offset then amplifier connected to the slave Arduino and Microphone connected to Master Arduino.

The problem is we can only hear the beat of songs and audio. Anyway my code is wrong or I need to increment the baud rate? Thank you.

Master:

#include <SoftwareSerial.h>
SoftwareSerial EEBlue(10, 11); // RX | TX
unsigned char incomingAudio = 0;

void setup(){
  Serial.begin(9600);
  EEBlue.begin(9600);  //Baud Rate for command Mode. 
}
 
void loop(){
    incomingAudio = (analogRead(A0));//read voltage at A0
      EEBlue.write(incomingAudio);
   Serial.println(incomingAudio);
   }

Slave:

#include <SoftwareSerial.h>
SoftwareSerial EEBlue(10, 11); // RX | TX
unsigned char data = 0;
void setup() {
  //cli();
    TCCR0A = 0;// set entire TCCR1A register to 0
    TCCR0B = 0;// same for TCCR1B
    TCNT0  = 0;//initialize counter value to 0
    // set compare match register for 1000000hz increments with 8 bits prescaler
    OCR0A = 49;// = (16*10^6) / (1000000*8) - 1 (must be <65536)
    // turn on CTC mode
    TCCR0A |= (1 << WGM12);
    // Set CS11 bit for 8 prescaler. Each timer has a different bit code to each prescaler
    TCCR0B |= (1 << CS11);  
    // enable timer compare interrupt
    TIMSK0 |= (1 << OCIE1A);
   // sei();
    DDRD = 0xFF;
    Serial.begin(9600);
  EEBlue.begin(9600);
}

void loop() {
    if (EEBlue.available() > 0)
   {
       data = EEBlue.read();
      Serial.println(data);
    }
}

ISR(TIMER0_COMPA_vect)
{
  PORTD = data;
  //insert your code here that you want to run every time the counter reaches OCR1A
}

9600 or 9.6k is not enough to transmit music. Low quality transmission is about 60k you need about 256k for decent transmission of sound. Which isn’t that fast in the real world. I believe the HC05 wasn’t designed for streaming music. If you get it to work that would be interesting.

Threads merged.