Back to engineering archive

Record 076 / Firmware and control

Keypad and analog-status alarm draft

An archived keypad-entry and analog-status application with mode selection, local LCD feedback and an indicator output.

Archived firmware draft
KeypadAnalog inputsI2C LCDStatus logic

Archived source flow

Selected archived input/status paths: read keypad and analog values, apply source scaling, process a key through entry checking, then gate local status on the mode. A gas-status check follows independently. PIN values are omitted. Integer input conversion is defective; no validated alarm operation is established.
Selected input/status paths reconstructed from archived source. Integer scaling loses intermediate analog levels; compilation and hardware operation are unverified. View diagram at full size

Technical notes

Entry and mode selection

checkPincode() collects keypad entry. A complete entry is compared with two stored codes to enable or disable the mode; an unmatched entry leaves the mode unchanged. The entry buffer is then reset.

Status paths

When the mode is enabled, the indicator is high and door, window and proximity readings can write status text. The disabled branch lowers the indicator. A gas-input display check follows outside the mode gate, while temperature messages go to Serial.

Material source limits

Integer division by 1023 occurs before multiplication by 5 in four input conversions; nominal readings from 0 to 1022 collapse to zero. Several writes share the same LCD row and can overwrite earlier messages. No siren output, calibrated measurement or validated alarm behaviour is established.

Engineering archiveArchive record

Project enquiries

Discuss your project.

Tell us what you’re developing and where you need engineering support.

Discuss your project