Light pen to Raspberry Pi's GPIO

A project log for Light pen support for RetroPie

Can a Raspberry Pi with CRT display support 8-bit era light pen?

maciej-witkowiakMaciej Witkowiak 06/07/2020 at 16:410 Comments

At start let's try to connect the light pen directly to Raspberry Pi's GPIO.

The plug of my light pen already had hints that we are only interested in four lines: GND, +5V, button and light detector.

Here is how I wired a simple adapter.

Power line goes to the +5V line from GPIO because there is a TTL chip inside that requires +5V as its power supply.

I chose to connect the button line (pin 3 on the plug) with GPIO 27 and light detector to GPIO 17.