Added alarm threshold checks
Added alarm setting and play the set sound when the threshold is broken