KrisKasprzak
Well-known member
I just got my audio shield and physically soldered to to my Teensy 3.2 (teensy is on top of the shield).
I have a mic connected to line in and using the attached sketch, peak1 always returns 0. I would expect something while i'm tapping the mic.
I'm using a shotgun style mic that is battery powered.
Any thoughts?
I have a mic connected to line in and using the attached sketch, peak1 always returns 0. I would expect something while i'm tapping the mic.
I'm using a shotgun style mic that is battery powered.
Any thoughts?
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=250,88
AudioAnalyzePeak peak1; //xy=647,224
AudioAnalyzePeak peak2; //xy=648,170
AudioAnalyzeToneDetect tone1; //xy=662,309
AudioAnalyzeToneDetect tone2; //xy=667,396
AudioConnection patchCord1(i2s1, 0, peak2, 0);
AudioConnection patchCord2(i2s1, 0, tone1, 0);
AudioConnection patchCord3(i2s1, 1, peak1, 0);
AudioConnection patchCord4(i2s1, 1, tone2, 0);
// GUItool: end automatically generated code
void setup() {
AudioMemory(4);
Serial.begin(9600);
}
// for best effect make your terminal/monitor a minimum of 31 chars wide and as high as you can.
void loop() {
if (peak1.available()) {
Serial.println( peak1.read());
}
}