add alarmInput thread function