def pulse_detection(reading, threshold):
    """
    Return a value of 1 if an input voltage is above a threshold
    and 0 if the value is below the threshold
    :param reading: Input voltage
    :param threshold: Threshold to which the input voltage is compared
    :return: 0 if below threshold, 1 if above threshold
    """
    if reading > threshold:
        pulse = 1
    else:
        pulse = 0
    return pulse