ICOMP-UNC / Bit-Masters

MIT License
0 stars 0 forks source link

[FEATURE][#2] Alarm system #15

Closed sofiavalos closed 1 week ago

sofiavalos commented 1 week ago

Dependencies

This change relies on the correct configuration of the alarm pin, as defined in the configuration.h header file. Ensure the alarm pin is properly mapped and that platform-specific settings are correct for proper alarm activation and deactivation.

What?

Two functions—activate_alarm() and deactivate_alarm()—were added to control the alarm system. These functions manage the state of the alarm by setting the alarm pin high (activating the alarm) or low (deactivating the alarm), while checking the current state to prevent unnecessary actions.

Why?

This change allows for automated control of the alarm system. By ensuring the alarm can only be activated or deactivated when necessary, it prevents redundant operations and ensures that the alarm system behaves as expected. This is useful in security applications where an automated response to certain conditions is required.

How?

The functions interact with the alarm control pin: