Witura WT-9001 IP65 Spécifications Page 68

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 82
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 67
52
uint8_t msg5[]="ALARM=IDLE\r\nDOOR=OPEN\r\nLOCK=ON";
uint8_t msg6[]="ALARM=IDLE\r\nDOOR=OPEN\r\nLOCK=OFF";
uint8_t msg7[]="ALARM=IDLE\r\nDOOR=CLOSE\r\nLOCK=ON";
uint8_t msg8[]="ALARM=IDLE\r\nDOOR=CLOSE\r\nLOCK=OFF";
/ *
BOOL ALARM = FALSE;
BOOL LOCK_ON = FALSE;
BOOL LOCK_PENDING = FALSE;
BOOL DOOR_OPEN = FALSE;
/*
void sec_lock(void);
void sec_unlock(void);
void sec_updateStatus(uint8_t* hpNum);
void sec_adminRight(sms_t* sms);
void sec_userRight(sms_t* sms);
BOOL isDoorOpen(void);
void SEC_init(void){
SET_BIT(DDRD,DDD3); //set PD3 as output (relay control)
SET_BIT(PORTC,PC0); //set pull up for limit switch (NC)
if(isDoorOpen()){ //check the door
sec_unlock(); //initialize the door lock state - unlock/door open
CLR_BIT(DDRC,DDC0); //set PC0 as input (limit switch)pen
}
else{
sec_lock(); //initialize the door lock state - lock/door close
}
}
void SEC_check(void){
isDoorOpen();
if(!ALARM){
if(DOOR_OPEN && LOCK_ON){
ALARM = TRUE;
GSM_tx(admin,secAlert,sizeof(secAlert));
}
else if(!DOOR_OPEN && LOCK_PENDING){
sec_lock();
//Update Sender
Vue de la page 67
1 2 ... 63 64 65 66 67 68 69 70 71 72 73 ... 81 82

Commentaires sur ces manuels

Pas de commentaire