2023-10-30 15:03:50 +00:00
|
|
|
#ifndef HARDWARE_H
|
|
|
|
#define HARDWARE_H
|
|
|
|
#include <Arduino.h>
|
|
|
|
|
|
|
|
#ifdef WEB_SERVER
|
|
|
|
#ifdef WEB_SERIAL_DEBUG
|
|
|
|
#include <WebSerial.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef BOARD1
|
|
|
|
#define TAMPER_PIN 26
|
|
|
|
#define LEDCTL_PIN 32
|
|
|
|
#define DATA0_PIN 34
|
|
|
|
#define DATA1_PIN 36
|
|
|
|
#define RELAY1_PIN 32
|
|
|
|
#define RELAY2_PIN 33
|
|
|
|
#define RELAY_DELAY 3000
|
2023-10-30 18:49:34 +00:00
|
|
|
#define RX_PIN 3
|
|
|
|
#define TX_PIN 1
|
2023-10-30 15:03:50 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef BOARD2
|
|
|
|
#define TAMPER_PIN 0
|
|
|
|
#define ALARM_PIN 33
|
|
|
|
#define WIEGAND_PIN 32
|
|
|
|
#define LEDCTL_PIN 25
|
|
|
|
#define DATA0_PIN 26
|
|
|
|
#define DATA1_PIN 27
|
|
|
|
#define RELAY1_PIN 13
|
|
|
|
#define RELAY_DELAY 3000
|
2023-10-30 18:49:34 +00:00
|
|
|
#define RX_PIN 3
|
|
|
|
#define TX_PIN 1
|
2023-10-30 15:03:50 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
void controlRelay();
|
|
|
|
void unlockDoor(bool silent);
|
|
|
|
void lockDoor();
|
|
|
|
void toggleDoor();
|
|
|
|
String stateDoor();
|
|
|
|
|
|
|
|
#endif
|