Light Pen Raspberry Pi Interface
1980s-era Commodore light pen interfaced with a Raspberry Pi CRT setup.
As the way we interact with computers developed in the 1980s, different interfacing methods were explored. While the keyboard/mouse combination became dominant (or touchscreens if you include smartphones), one interesting alternative of the time was the Turbo Computer Lightpen for the Commodore 64/128. This device acted in a similar manner to a modern stylus, but instead of the screen sensing the device’s location, the pen itself picked up on the refreshing screen to relay a position back to the computer.
Jumping forward to the 2020s, Maciej Witkowiak had a RetroPie system connected to a 5” portable TV, and got curious to see whether the light pen could be used with it. After quite a bit of hacking and investigation, he was able to get the light pen to work as an HID interface, sending absolute positions back to his Pi setup like a drawing tablet via a Pro Micro. A pointing demo is seen in the video below.
A bit more information on how this project works is found in a separate development post. The trick here is that a cathode ray tube (CRT) TV refreshes its image line-by-line as a series of bright dots that are invisible to the human eye. When carefully tracked by a computer, a position can then be inferred from these quick blinks. Early on, Witkowiak tried to send CRT timing signals and pulses to the Pi directly from the light pen, but eventually wired up an LM1881 video decoder to help pull off this retro-futuristic interface.
Engineer, maker of random contraptions, love learning about tech. Write for various publications, including Hackster!