“photo sensors are used light to count people passes through the gate when two sensors are positioned in parallel at the edge of the door and if the inside part is crossed at the first time the counter reduces by one and if the outer sensor is crossed the counter increases by one this is how i want the counters followed to count .my question is 1) how do photo signals exchange to electrical signal? 2)wat type of programing language is used to have perfect counters? 3)how do the microcontroler know wether the crossing is for the first time or not? for all cases the photo sensors detects the counted thing like people when they are reflected