Added buzzer
This commit is contained in:
parent
0af39c6eb5
commit
d85eb7292b
@ -12,6 +12,8 @@ const int SENSOR_HANDLE_PIN = 1;
|
|||||||
const int SENSOR_DISABLE_PIN = 0;
|
const int SENSOR_DISABLE_PIN = 0;
|
||||||
const int SENSOR_CLOSE_PIN = 10;
|
const int SENSOR_CLOSE_PIN = 10;
|
||||||
|
|
||||||
|
const int BUZZER_PIN = 11;
|
||||||
|
|
||||||
const int BTN_LOCK_PIN = 3;
|
const int BTN_LOCK_PIN = 3;
|
||||||
const int BTN_UNLOCK_PIN = 4;
|
const int BTN_UNLOCK_PIN = 4;
|
||||||
const int LED_LOCK_PIN = 5;
|
const int LED_LOCK_PIN = 5;
|
||||||
@ -113,7 +115,7 @@ ZUNO_SETUP_CHANNELS(
|
|||||||
ZUNO_SWITCH_BINARY(getterAlarmActivate, setterAlarmActivate),
|
ZUNO_SWITCH_BINARY(getterAlarmActivate, setterAlarmActivate),
|
||||||
ZUNO_SWITCH_BINARY(getterAlarmConfirm, setterAlarmConfirm),
|
ZUNO_SWITCH_BINARY(getterAlarmConfirm, setterAlarmConfirm),
|
||||||
ZUNO_SWITCH_MULTILEVEL(getterStoreRFID, setterStoreRFID),
|
ZUNO_SWITCH_MULTILEVEL(getterStoreRFID, setterStoreRFID),
|
||||||
ZUNO_SENSOR_BINARY_DOOR_WINDOW(getterDoor),
|
ZUNO_SENSOR_BINARY_DOOR_WINDOW(getterDoor)
|
||||||
);
|
);
|
||||||
|
|
||||||
void set_servo(int mode, int source){
|
void set_servo(int mode, int source){
|
||||||
@ -353,6 +355,12 @@ void setup() {
|
|||||||
|
|
||||||
load_rfid_keys();
|
load_rfid_keys();
|
||||||
set_servo(SERVO_CENTER, SOURCE_SYSTEM);
|
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:
|
// the loop routine runs over and over again forever:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user