From d85eb7292b9e6867dce90784342419829b55759b Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Thu, 22 Feb 2018 07:52:24 +0100 Subject: [PATCH] Added buzzer --- zuno/zuno.ino | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/zuno/zuno.ino b/zuno/zuno.ino index 1740510..a5374bb 100644 --- a/zuno/zuno.ino +++ b/zuno/zuno.ino @@ -12,6 +12,8 @@ const int SENSOR_HANDLE_PIN = 1; const int SENSOR_DISABLE_PIN = 0; const int SENSOR_CLOSE_PIN = 10; +const int BUZZER_PIN = 11; + const int BTN_LOCK_PIN = 3; const int BTN_UNLOCK_PIN = 4; const int LED_LOCK_PIN = 5; @@ -113,7 +115,7 @@ ZUNO_SETUP_CHANNELS( ZUNO_SWITCH_BINARY(getterAlarmActivate, setterAlarmActivate), ZUNO_SWITCH_BINARY(getterAlarmConfirm, setterAlarmConfirm), ZUNO_SWITCH_MULTILEVEL(getterStoreRFID, setterStoreRFID), - ZUNO_SENSOR_BINARY_DOOR_WINDOW(getterDoor), + ZUNO_SENSOR_BINARY_DOOR_WINDOW(getterDoor) ); void set_servo(int mode, int source){ @@ -353,6 +355,12 @@ void setup() { load_rfid_keys(); set_servo(SERVO_CENTER, SOURCE_SYSTEM); + + pinMode(BUZZER_PIN, OUTPUT); // setup pin as output + digitalWrite(BUZZER_PIN, HIGH); + delay(200); + digitalWrite(BUZZER_PIN, LOW); + } // the loop routine runs over and over again forever: