code: def start_adc_comparator(self, channel, high_threshold, low_threshold,
                               gain=1, data_rate=None, active_low=True,
                               traditional=True, latching=False, num_readings=1):
          
          assert 0 <= channel <= 3, 'Channel must be a value within 0-3!'
          # Start continuous reads with comparator and set the mux value to the
          # channel plus the highest bit (bit 3) set.
          return self._read_comparator(channel + 0x04, gain, data_rate,
                                       ADS1x15_CONFIG_MODE_CONTINUOUS,
                                       high_threshold, low_threshold, active_low,
                                       traditional, latching, num_readings)
docs: Start continuous ADC conversions on the specified channel (0-3) with
          the comparator enabled.  When enabled the comparator to will check if
          the ADC value is within the high_threshold & low_threshold value (both
          should be signed 16-bit integers) and trigger the ALERT pin.  The
          behavior can be controlled by the following parameters:
            - active_low: Boolean that indicates if ALERT is pulled low or high
                          when active/triggered.  Default is true, active low.
            - traditional: Boolean that indicates if the comparator is in traditional
                           mode where it fires when the value is within the threshold,
                           or in window mode where it fires when the value is _outside_
                           the threshold range.  Default is true, traditional mode.
            - latching: Boolean that indicates if the alert should be held until
                        get_last_result() is called to read the value and clear
                        the alert.  Default is false, non-latching.
            - num_readings: The number of readings that match the comparator before
                            triggering the alert.  Can be 1, 2, or 4.  Default is 1.
          Will return an initial conversion result, then call the get_last_result()
          function continuously to read the most recent conversion result.  Call
          stop_adc() to stop conversions.