if (digitalRead(button)) {
selectedSensor++;
if (selectedSensor > 3) selectedSensor = 1;
}
switch selectedSensor {
case 1:
readSensor(sensor1pin);
break;
case 2:
readSensor(sensor2pin);
break;
case 3:
readSensor(sensor3pin);
break;
}
Do debounce your button (either in hardware or software - plenty of examples out there). I assume same sensor on all pins, so you just have to provide the correct pin and read that sensor. Change the number of sensors to your number.