- September 28th, 2019, 6:07 pm#4924877
I did a quick proof of concept and both audio boards did play different sounds at the same time. So, I guess I just have to keep digging.
***Proof of Concept***
//Both boards play sounds individually.
#include <SoftwareSerial.h>
#include "Adafruit_Soundboard.h"
// soundboard pins and setup
#define SFX_RST 23
#define SFX_RX 10
#define SFX_TX 11
const int ACT = 9; // this allows us to know if the audio is playing
// soundboard pins and setup
#define SFX_RSTGun 25
#define SFX_RXGun 12
#define SFX_TXGun 13
const int ACTGun = 8; // this allows us to know if the audio is playing
SoftwareSerial ss = SoftwareSerial(SFX_TX, SFX_RX);
Adafruit_Soundboard sfx = Adafruit_Soundboard( &ss, NULL, SFX_RST);
SoftwareSerial ssGun = SoftwareSerial(SFX_TXGun, SFX_RXGun);
Adafruit_Soundboard sfxGun = Adafruit_Soundboard( &ssGun, NULL, SFX_RSTGun);
void setup() {
Serial.begin(115200);
ss.begin(9600);
ssGun.begin(9600);
}
void loop() {
sfx.playTrack(3);
sfxGun.playTrack(1);
}
***Proof of Concept***
//Both boards play sounds individually.
#include <SoftwareSerial.h>
#include "Adafruit_Soundboard.h"
// soundboard pins and setup
#define SFX_RST 23
#define SFX_RX 10
#define SFX_TX 11
const int ACT = 9; // this allows us to know if the audio is playing
// soundboard pins and setup
#define SFX_RSTGun 25
#define SFX_RXGun 12
#define SFX_TXGun 13
const int ACTGun = 8; // this allows us to know if the audio is playing
SoftwareSerial ss = SoftwareSerial(SFX_TX, SFX_RX);
Adafruit_Soundboard sfx = Adafruit_Soundboard( &ss, NULL, SFX_RST);
SoftwareSerial ssGun = SoftwareSerial(SFX_TXGun, SFX_RXGun);
Adafruit_Soundboard sfxGun = Adafruit_Soundboard( &ssGun, NULL, SFX_RSTGun);
void setup() {
Serial.begin(115200);
ss.begin(9600);
ssGun.begin(9600);
}
void loop() {
sfx.playTrack(3);
sfxGun.playTrack(1);
}