Hi,
I have a costum pcb and have Serial3 buffered to 5v connected to a MAX-485 dmx output. I was having some problems with my code only working after recompiling and using the reset button on the teensy 4.1 and when I re-apply power to the teensy the code will freeze at the start of my code.
After allot of troubleshooting I think it is not possible to use Serial3 when the audio shield is connected, even when I only need TX from Serial3(which isn't used by the audio shield).
Is it possible to make the audio shield reserve less pins in software?
I think if the audio library doesn't use the pin15(which I don't use) than that frees up the Serial3 pins that I need.
I don't get any error messages.
Hardware:
Teensy4.1
Teensy audio shield rev D
MAX-485 DMX driver
Thanks for the help,
Kind regards,
Bram
I have a costum pcb and have Serial3 buffered to 5v connected to a MAX-485 dmx output. I was having some problems with my code only working after recompiling and using the reset button on the teensy 4.1 and when I re-apply power to the teensy the code will freeze at the start of my code.
Code:
//faulty code
#include <TeensyDMX.h>
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
//dmx
namespace teensydmx = ::qindesign::teensydmx;
teensydmx::Sender dmxTx{Serial3};
#define DMX_AANTAL 10
//audio shield
AudioPlaySdWav playWav1;
AudioOutputI2S audioOutput;
AudioConnection patchCord1(playWav1, 0, audioOutput, 0);
AudioConnection patchCord2(playWav1, 1, audioOutput, 1);
AudioControlSGTL5000 sgtl5000_1;
void setup() {
Serial.begin(115200);
Serial.println("Serialbegin");
sgtl5000_1.enable(); // Initalize SGT audio
Serial.println("enable audioshield");
dmxTx.begin();
Serial.println("DmxTX BEGIN");
//test dmx
for(int i=1; i<DMX_AANTAL; i++){
Serial.print(i);
dmxTx.set(i, 255);
delay(100);
dmxTx.set(i,0);
}
Serial.println();
Serial.println("Done testing DMX");
}
void loop() {
}
After allot of troubleshooting I think it is not possible to use Serial3 when the audio shield is connected, even when I only need TX from Serial3(which isn't used by the audio shield).
Is it possible to make the audio shield reserve less pins in software?
I think if the audio library doesn't use the pin15(which I don't use) than that frees up the Serial3 pins that I need.
I don't get any error messages.
Hardware:
Teensy4.1
Teensy audio shield rev D
MAX-485 DMX driver
Thanks for the help,
Kind regards,
Bram