docs: def main():
      """
      Example application that sends an email when an alarm event is
      detected.
      """
      try:
          # Retrieve the first USB device
          device = AlarmDecoder(SerialDevice(interface=SERIAL_DEVICE))
  
          # Set up an event handler and open the device
          device.on_alarm += handle_alarm
          with device.open(baudrate=BAUDRATE):
              while True:
                  time.sleep(1)
  
      except Exception as ex:
          print('Exception:', ex)