I have built a system with 5 slotted switch sensors that are currently individually driving 5 LEDs. When none of the sensors are blocked, all 5 LEDs are on. As each sensor is sequentially blocked, the 5 LEDs turn off sequentially. What I am trying to do is to have 6 different images project on a computer screen depending on how many of the sensors are blocked.

If I connect each of the 5 sensors to PINS 1-5 (and for argument sake when the sensor is not blocked, it produces an analog value > 50 and when blocked the signal is <50), I think the following "logic" would accomplish what I want:

The more i think about it the more i need to know more of what you are trying to do and if this is all your code. You can do multiple things at once since they are all checking the same thing..... so you could do this.