|
| void | playPattern (const unsigned int *timings, uint8_t length) |
| | Starts playing a buzzer pattern.
|
| void | updateBuzzer () |
| | Advances the buzzer state machine.
|
| void | stopBuzzer () |
| | Immediately stops any active buzzer sound.
|
| void | playLockSound () |
| | Plays lock sound pattern.
|
| void | playUnlockSound () |
| | Plays unlock sound pattern.
|
| void | playDeniedSound () |
| | Plays denied-access sound pattern.
|
| void | playTapSound () |
| | Plays keypad tap sound.
|
| static void | forceLock () |
| | Forces the system into a locked idle state.
|
| void | callback (char *topic, byte *payload, unsigned int length) |
| | MQTT message callback handler.
|
| void | setup () |
| | Arduino setup function.
|
| void | loop () |
| | Arduino main loop.
|
|
| WifiMqttClient | net |
| | WiFi + MQTT client wrapper.
|
| constexpr char | WIFI_SSID [] = "Mathias2.4" |
| | WiFi SSID.
|
| constexpr char | WIFI_PASS [] = "mrbombasticcallmefantastic" |
| | WiFi password.
|
| constexpr char | MQTT_HOST [] = "maqiatto.com" |
| | MQTT broker hostname.
|
| constexpr uint16_t | MQTT_PORT = 1883 |
| | MQTT broker port.
|
| constexpr char | MQTT_USER [] = "hectorfoss@gmail.com" |
| | MQTT username.
|
| constexpr char | MQTT_PASS [] = "potter" |
| | MQTT password.
|
| constexpr char | DEVICE_ID [] = "door1" |
| | Unique device identifier used in MQTT topics.
|
| constexpr uint8_t | RED_PIN = 4 |
| | GPIO pin assignments.
|
| constexpr uint8_t | GREEN_PIN = 0 |
| constexpr uint8_t | BUZZER_PIN = 14 |
| constexpr uint8_t | SERVO_PIN = 13 |
| constexpr uint32_t | UNLOCK_TIME_MS = 5000 |
| | Door unlock duration (ms).
|
| uint32_t | unlockUntil = 0 |
| | Timestamp (ms) until which the door remains unlocked.
|
| bool | unlocked = false |
| | Indicates whether the door is currently unlocked.
|
| AccessResult | accessGranted |
| | Result of keypad PIN verification.
|
| bool | rfidAccess = false |
| | Indicates whether RFID access was granted.
|
| Servo | lock_servo |
| | Servo instance controlling the lock mechanism.
|
| bool | servoOpen = false |
| | Indicates whether the servo is currently in the open position.
|
| uint8_t | servoAngle |
| | Current servo angle (derived from potentiometer in admin mode).
|
| bool | adminServoControl = false |
| | Enables direct servo control via potentiometer (admin mode).
|
| const unsigned int | deniedTimings [] |
| | Denied access: single long beep. Extra long to scare.
|
| const unsigned int | lockTimings [] |
| | Lock sound: long-long-long pattern.
|
| const unsigned int | unlockTimings [] |
| | Unlock sound: short-short pattern.
|
| const unsigned int | beepTimings [] |
| | Keypad tap sound: short beep.
|
| BuzzerState | buzzerState = BUZZER_IDLE |
| | Current buzzer state.
|
| BuzzerPattern | currentPattern = {nullptr, 0} |
| | Currently active buzzer pattern.
|
| uint8_t | stepIndex = 0 |
| | Index into the timing array.
|
| unsigned long | lastChange = 0 |
| | Timestamp of last buzzer state change.
|
Door actuator, buzzer, and LED controller with MQTT integration.
Definition in file esp3.ino.