Skip to content

Commit

Permalink
Update microphone example
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Sep 19, 2024
1 parent b704850 commit 3fc6fd0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions examples/Microphone/Microphone.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@
#include "es7210.h"
#include "utilities.h"


#if ESP_ARDUINO_VERSION != ESP_ARDUINO_VERSION_VAL(2,0,9)
void setup()
{
Serial.begin(115200);
}
void loop()
{
Serial.println("Can only run on arduino-esp32 core version 2.0.9"); delay(1000);
}
#else
#define VAD_SAMPLE_RATE_HZ 16000
#define VAD_FRAME_LENGTH_MS 30
#define VAD_BUFFER_LENGTH (VAD_FRAME_LENGTH_MS * VAD_SAMPLE_RATE_HZ / 1000)
Expand Down Expand Up @@ -109,4 +118,5 @@ void loop()
Serial.println("Speech detected");
}
delay(5);
}
}
#endif

0 comments on commit 3fc6fd0

Please sign in to comment.