diff --git a/Software/Python/grovepi.py b/Software/Python/grovepi.py index 28ad9471..2a7a7034 100755 --- a/Software/Python/grovepi.py +++ b/Software/Python/grovepi.py @@ -238,7 +238,7 @@ def read_i2c_block(no_bytes = max_recv_size): def read_identified_i2c_block(read_command_id, no_bytes): data = [-1] - while data[0] != read_command_id[0]: + while len(data) <= 1: data = read_i2c_block(no_bytes + 1) return data[1:]