Then there is one frame per target with the target as a white block, to detect which target the gun is pointing at, if any.
There is a full frame that is black where the gun is sampled. Instead drawing a frame with white for a hit, black for a miss and testing which you where pointing at. Despite his confusing intro, he correctly says the NES dose not track the flying spot. More information and his code can be found on his GitHub repository. He explains the timing problem and his solution in the video below the break. Knowing both position and timing, the Arduino can then flash a white LED stuck to the end of the light gun barrel at the exact moment that part of the CRT would have been lit up, and as far as the game is concerned it has received the input it is expecting. He senses where the gun is pointing using a Wiimote with its sensor bar on top of the TV through a Raspberry Pi, and feeds the positional information to an Arduino.
All timing is lost, and the console can no longer sense position. Whereas a CRT displayed the dot on its screen in perfect synchronization with the console output, an LCD captures a whole frame, processes it and displays it in one go.
A lens and photo cell mounted in a gun-like plastic case, the console could calculate where on the screen it was pointing when its trigger was pressed by flashing the screen white and sensing the timing at which the on-screen flying spot triggered the photo cell. A must-have peripheral for games consoles of the s and s was the light gun.