 }
 
 void playBuzzer() {
-  for (int i = 0; i < 300 && isEnabled() ; i++) {
-    digitalWrite(BUZZ_OUT, HIGH);
-    delay(500);
-    digitalWrite(BUZZ_OUT, LOW);
-    delay(500);
+  for (int i = 0; i < 300 && isEnabled(); i++) {
+    int d = random(1, 7);
+    for (int j = 100; j < 255; j++) {
+      analogWrite(BUZZ_OUT, j);
+      delay(d);
+    }
+    for (int j = 255; j > 100; j--) {
+      analogWrite(BUZZ_OUT, j);
+      delay(d);
+    }
   }
+  analogWrite(BUZZ_OUT, 0);
 }
 
 void playSongs() {

}

boolean isEnabled() {
  printDebug(35);
  return digitalRead(SWITCH_IN) == HIGH && digitalRead(SENSOR_IN) == LOW;
}

void printDebug(int code) {

const int SENSOR_IN = A0;
const int SWITCH_IN = A1;
const int OSC_OUT = 5;
const int BUZZ_OUT = 9;

// melody notes
#define _0 0
