Two arduino processors one audio sound?

Hello, I was just curious if I have one processor that is serving up the arduino sound tracks doing all the heavy lifting and a second processor that is outputting all the sounds. How would that work from a programming point of view?

It’s a more of a Curiosity then anything else.

Joseph

Why use two Arduinos and what sort of Arduinos are they ?

Hey @UKHeliBob good to see you again. Honestly i was unsure and ask I was just wondering and curious. It’s more of the line I was thinking like a pc in a way how you have the main cpu and a sound card that produces the sound itself.

Both arduinos are the arduino Leonardo’s.

Every sound app I have seen in the Arduino/esp world uses a single board.

@sonofcy I was thinking that too. Not for the WiFi or Bluetooth.

Not sure what you mean, an esp32 can do WiFi, Bluetooth and process sound easily, no idea re the Leonardo. From what I have read the esp32 is generally more powerful than Arduino's but I have no exposure to the Leonardo. I think the Leonardo is a fairly old product but no idea if it will work well for your use case.

Why is this hidden for ?

@sonofcy I just mean I don’t need WiFi or Bluetooth for this project. Wondering how I can pass the code through from one arduino to anotherThe audio file.

Well, you could use an SD card. What is the audio? Something you are creating from a microphone? Don’t forget most sound also has a timing component. That makes the audio intelligible if that is necessary.

Family clips of us going nuts having fun.

Well you don;t have to use the radios, but maybe you should fully explain your project so one of us can give you a better solution.

1 Like

+1 to that

I don't understand what you are trying to do. More details please

1 Like

Do you mean videos? If not, then only audio? Why not use your phone, it has a recorder, or purchase an audio recorder, they can be had for $20 at the low end and most are about $35.

1 Like

In the vast majority of cases, using two controllers not only doesn't provide a 2x speedup, but can actually slow down processing. This is because for a combination of two controllers to work quickly, you need a powerful and reliable data communication channel, which requires a lot of resources. As a result, a combination of two Arduinos can be slower than a single controller.

What do you mean, passing the code is weird and not needed.

Use a standalone DFPlayerMini with an SDcard for data storage, for audio, but not Arduino.

You can use Arduino to control the DFPlayerMini through a two-wire, serial bus.

If you think you want "streaming" style audio between processors, search "I2S ESP32"

Maybe not streaming audio, but file transfer.

read a byte of audio file
calculate crc
wait for ready ack
send a byte of audio file
if not EOF repeat
.
.
receive a byte of audio file
verify crc
ack the byte
write a byte of audio file
if not EOF, repeat
.
.
"play" the file.

I wrote a data transfer for 1553 (1Mbit/s) which took a few seconds per file (1553 was the customer's internal comm method)... Each file took a few seconds. They had time to wait.

BUT why would the OP need two esp32?

BYO mcu party? (for family clips, going nuts)
[edit] see post #11

Sorry, I don;t understand at all. Goodbye.