Davidelvig
Well-known member
I've added these to my project, and am getting some strange behavior.
"peak" works, and returns appropriate available() and read(), but the compiler chokes on readPeakToPeak().
"rms" causes a compiler failure on declaration of the AudioAnalyzeRMS object.
I have Arduino 1.6.6 and Teensyduino 1.27
I updated from 1.26 to 1.27 to try to address this.
See attached code:
Compile of the above gets: 'RMS' was not declared in this scope
Removing the RMS-related code gets
'class AudioAnalyzePeak' has no member named readPeakToPeak
Any ideas?
"peak" works, and returns appropriate available() and read(), but the compiler chokes on readPeakToPeak().
"rms" causes a compiler failure on declaration of the AudioAnalyzeRMS object.
I have Arduino 1.6.6 and Teensyduino 1.27
I updated from 1.26 to 1.27 to try to address this.
See attached code:
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S Mic; //xy=79,135
AudioAnalyzePeak PEAK; //xy=236,154
AudioAnalyzeRMS RMS; //xy=239,191
AudioConnection patchCord1(Mic, 0, PEAK, 0);
AudioConnection patchCord2(Mic, 0, RMS, 0);
AudioControlSGTL5000 TeensyCodec; //xy=100,80
// GUItool: end automatically generated code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
if (PEAK.available()) {
float p = PEAK.read();
p = PEAK.readPeakToPeak();
}
if (RMS.available()) {
float r = RMS.read();
}
}
Compile of the above gets: 'RMS' was not declared in this scope
Removing the RMS-related code gets
'class AudioAnalyzePeak' has no member named readPeakToPeak
Any ideas?