def voltage(raw_value, v_min=0, v_max=10, res=32760, gain=1):
    """Converts a raw value to a voltage measurement.

    ``V = raw_value / res * (v_max - v_min) * gain``

    """

    return (float(raw_value) / res * (v_max - v_min) * gain, "V")