const int micPin = 35;
const int threshold = 500; // Adjust based on your microphone sensitivity
void setup() {
Serial.begin(115200);
pinMode(micPin, INPUT);
}
void loop() {
int soundLevel = analogRead(micPin);
Serial.println(soundLevel);
if (soundLevel > threshold) {
Serial.println("Sound detected!");
}
delay(100);
}