@staticmethod
def zigate_encode(data):
    """encode all characters < 0x02 to avoid """
    encoded = []
    for x in data:
        if x < 16:
            encoded.append(2)
            encoded.append(x ^ 16)
        else:
            encoded.append(x)
    return encoded
