2023-06-12 17:17:28 +00:00
|
|
|
#ifndef HARDWARE_H
|
|
|
|
#define HARDWARE_H
|
|
|
|
#include <Arduino.h>
|
|
|
|
|
2024-01-30 15:03:40 +00:00
|
|
|
#ifdef BOARD1
|
|
|
|
#ifdef WG_READER
|
|
|
|
#define TAMPER_PIN 26
|
|
|
|
#define LEDCTL_PIN 32
|
|
|
|
#define DATA0_PIN 34
|
|
|
|
#define DATA1_PIN 36
|
2023-06-12 17:17:28 +00:00
|
|
|
#endif
|
|
|
|
|
2024-01-30 15:03:40 +00:00
|
|
|
|
2023-06-12 17:17:28 +00:00
|
|
|
#define RELAY1_PIN 32
|
|
|
|
#define RELAY2_PIN 33
|
|
|
|
#define RELAY_DELAY 3000
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef BOARD2
|
2024-01-30 15:03:40 +00:00
|
|
|
#ifdef WG_READER
|
|
|
|
#define TAMPER_PIN 0
|
|
|
|
#define ALARM_PIN 33
|
|
|
|
#define LEDCTL_PIN 25
|
|
|
|
#define DATA0_PIN 26
|
|
|
|
#define DATA1_PIN 27
|
|
|
|
#define BIT_MODE_WG34_PIN 32
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef TTL_READER
|
|
|
|
#define TXD 17
|
|
|
|
#define RXD 16
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2023-06-12 19:43:01 +00:00
|
|
|
#define RELAY1_PIN 13
|
2023-06-12 17:17:28 +00:00
|
|
|
#define RELAY_DELAY 3000
|
2024-01-30 15:03:40 +00:00
|
|
|
|
2023-06-12 17:17:28 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
void controlRelay();
|
|
|
|
void unlockDoor(bool silent);
|
2023-12-27 21:41:33 +00:00
|
|
|
void lockDoor(bool silent);
|
2023-06-12 17:17:28 +00:00
|
|
|
void toggleDoor();
|
2023-06-13 15:09:48 +00:00
|
|
|
String stateDoor();
|
2023-06-13 21:05:43 +00:00
|
|
|
|
2023-06-12 17:17:28 +00:00
|
|
|
#endif
|