USB Zapper Adapter

Not so long ago, basic support for a lightgun appeared in the master-branch of the FCEUX emulator, the signals of which, namely, the light sensor and trigger, are accepted as signals of a standard gamepad. Thus, in order for a real lightgun to be "heard" by the emulator, it is enough to assemble an adapter that would translate these lightgun signals into gamepad buttons signals.

Digispark version

This version of the adapter is the cheapest option so far. Thanks r57zone for the hard work! The entire process of creating an adapter can be seen in detail in this video:

Teensy 2.0 version

With the help of arduino-nano-like board, you can implement the desired USB adapter. It is important that it is based on the ATmega32u4 microcontroller, which has hardware support for the USB interface and operates at a 1 kHz polling rate.

Principal circuit diagram

Quite simple, yep? Thanks for that Лёша Кластер.

Arduino Sketch

The sketch code is as simple as possible and can be customized for other ardiono-like boards. It is only important to specify the pins correctly. Zapper signals emulate generic gamepad buttons 1 and 2. A special feature of the firmware is the LED blinking when the trigger is pulled.

Download Sketch

Important setup: