46 lines
939 B
C
46 lines
939 B
C
#ifndef HARDWARE_H
|
|
#define HARDWARE_H
|
|
#include <Arduino.h>
|
|
|
|
#ifdef BOARD1
|
|
#ifdef WG_READER
|
|
#define TAMPER_PIN 26
|
|
#define LEDCTL_PIN 32
|
|
#define DATA0_PIN 34
|
|
#define DATA1_PIN 36
|
|
#endif
|
|
|
|
|
|
#define RELAY1_PIN 32
|
|
#define RELAY2_PIN 33
|
|
#define RELAY_DELAY 3000
|
|
#endif
|
|
|
|
#ifdef BOARD2
|
|
#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
|
|
|
|
#define RELAY1_PIN 13
|
|
#define RELAY_DELAY 3000
|
|
|
|
#endif
|
|
|
|
void controlRelay();
|
|
void unlockDoor(bool silent);
|
|
void lockDoor(bool silent);
|
|
void toggleDoor();
|
|
String stateDoor();
|
|
|
|
#endif
|