Hi,
I am using the Teensy 3.2 and I want to receive 3 values via hardware Serial (serial1, serial2, serial3) that i want to use to modulate my sound.
However, it seems like hardware Serial makes my sound very low.
I have tried the example code "PT 8211 Sine"
and sound is clear and loud. However, when I add :
The sound becomes very faint. I don't know what to do, any ideas?
I am using the Teensy 3.2 and I want to receive 3 values via hardware Serial (serial1, serial2, serial3) that i want to use to modulate my sound.
However, it seems like hardware Serial makes my sound very low.
I have tried the example code "PT 8211 Sine"
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioSynthWaveform waveform1; //xy=110,75
AudioOutputPT8211 pt8211_1; //xy=303,78
AudioConnection patchCord1(waveform1, 0, pt8211_1, 0);
AudioConnection patchCord2(waveform1, 0, pt8211_1, 1);
// GUItool: end automatically generated code
void setup() {
AudioMemory(15);
waveform1.begin(WAVEFORM_SINE);
waveform1.frequency(440);
waveform1.amplitude(0.99);
}
void loop() {
}
and sound is clear and loud. However, when I add :
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioSynthWaveform waveform1; //xy=110,75
AudioOutputPT8211 pt8211_1; //xy=303,78
AudioConnection patchCord1(waveform1, 0, pt8211_1, 0);
AudioConnection patchCord2(waveform1, 0, pt8211_1, 1);
// GUItool: end automatically generated code
// set this to the hardware serial port you wish to use
#define SERIAL_S1 Serial1 //0 1
#define SERIAL_S2 Serial2 // 9 10
bool S1 = false;
bool S2 = false;
int rssi_S1 =0;
int rssi_S2 =0;
void setup() {
AudioMemory(15);
waveform1.begin(WAVEFORM_SINE);
waveform1.frequency(440);
waveform1.amplitude(0.99);
//SERIAL_S1.begin(9600);
// SERIAL_S2.begin(9600);
Serial.begin(9600);
Serial.print("teensy ready");
}
void loop() {
}
The sound becomes very faint. I don't know what to do, any ideas?