Trisha
Published

Noise Notifier

Let's people know they're too loud and won't stop until they're quiet again.

BeginnerShowcase (no instructions)3
Noise Notifier

Things used in this project

Hardware components

SparkFun Sound Detector (with Headers)
SparkFun Sound Detector (with Headers)
×1
Photon 2
Particle Photon 2
×1
Breadboard (generic)
Breadboard (generic)
×1
active buzzer
×1

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE

Hand tools and fabrication machines

Just any tiny Screwdriver

Story

Read more

Code

Final Code

Arduino
Has buzzer sound when noise threshold passed. Sound threshold depends on what one decides is "too loud."
 int soundSensorPin = A0; 
 int buzzerPin = D1;       

 //int soundThreshold = too loud level; 

void setup() {
  Serial.begin(9600);       
  pinMode(buzzerPin, OUTPUT); 
  digitalWrite(buzzerPin, LOW);
}

void loop() {
  int soundLevel = analogRead(soundSensorPin); 
  Serial.println(soundLevel);               

  if (soundLevel > soundThreshold) {
    digitalWrite(buzzerPin, HIGH);
  } else {
    digitalWrite(buzzerPin, LOW);  
  }

  delay(500); 
}

Credits

Trisha
1 project • 0 followers

Comments