read_sensors:
for sensor = 0 to 4
Can you use a different variable name here? Just a quick thought.