In a series of sensors, with corresponding LEDs of which if the corresponding sensor got intercepted the LED goes 100%, other wise its 50%, it goes on 100% till the adjescent sensor is intercepted, how can we implement this idea ?, i used various codes with bit shifting, gates etc , none is working, anyone have a better idea ?