“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







![Norton Internet Security 2012 - 5 Users [Download]](http://ecx.images-amazon.com/images/I/5129KXadMXL._SL160_.jpg)


1. A transformer
2. English
3. If it is just a simple photo sensor, it wont, unless you have some fancy facial recognition software and hardware.
a) Photo sensor is a general term. How it is implemented depends on the device. A self-contained photoelectric sensor contains the optics, along with the electronics. It requires only a power source. The sensor performs its own modulation, demodulation, amplification, and productivity switching. The result will be any data or a logic level. Any way, the information then will be routed to a processor.
b) The programming language depends on the processor. Usually, none is needed for the Photo sensor.
c) The Photo sensor detects events. One item (in this case a person) passes by the sensor will cause the sensor to productivity one transition. Usually, the processor will determine the nature of the event, and the action required.