From f25af3dd0044bd133613bdb4ddbb1838aeeb3373 Mon Sep 17 00:00:00 2001 From: Dave Coles Date: Wed, 28 Sep 2022 10:49:44 +0100 Subject: [PATCH] Example for testing the 2nd I2S output with the F32 library --- .../TestSecondI2SOutput.ino | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 examples/TestSecondI2SOutput/TestSecondI2SOutput.ino diff --git a/examples/TestSecondI2SOutput/TestSecondI2SOutput.ino b/examples/TestSecondI2SOutput/TestSecondI2SOutput.ino new file mode 100644 index 0000000..d80c5d7 --- /dev/null +++ b/examples/TestSecondI2SOutput/TestSecondI2SOutput.ino @@ -0,0 +1,34 @@ +#include +#include +#include +#include +#include +#include "OpenAudio_ArduinoLibrary.h" + +// GUItool: begin automatically generated code +AudioSynthWaveformSine_F32 sine2; //xy=179,339 +AudioSynthWaveformSine_F32 sine1; //xy=184,267 +AudioOutputI2S2_F32 audio_out; //xy=600,261 +AudioConnection_F32 pc1(sine1, 0, audio_out, 0); +AudioConnection_F32 pc2(sine2, 0, audio_out, 1); +AudioControlSGTL5000 sgtl5000_1; //xy=591,96 +// GUItool: end automatically generated code + +void setup(void) { + + AudioMemory(4); + AudioMemory_F32(4); + + sgtl5000_1.enable(); + + sine1.frequency(300); + sine1.amplitude(0.5); + sine1.begin(); + + sine2.frequency(600); + sine2.amplitude(0.8); + sine2.begin(); + +} + +void loop() {} \ No newline at end of file