def voltage_to_direction(voltage: float) -> str:
    """
    Converts an anolog voltage to a direction

    Arguments:
        - voltage: Voltage float value form the MCP3008. values are between 0 and 3.3V

    Returns:
        - Direction coresponding to an input voltage
    """
    if voltage < 0.20625 or voltage > 3.09375:
        return "N"
    elif 0.20625 <= voltage < 0.61875:
        return "NE"

    elif 0.61875 <= voltage < 1.03125:
        return "E"

    elif 1.03125 <= voltage < 1.44375:
        return "SE"

    elif 1.44375 <= voltage < 1.85625:
        return "S"

    elif 1.85625 <= voltage < 2.26875:
        return "SW"

    elif 2.26875 <= voltage < 2.68125:
        return "W"

    else:
        return "NW"