Skip to content

Instantly share code, notes, and snippets.

View udrzets's full-sized avatar

Komisarov Vitalii udrzets

View GitHub Profile
@cleure
cleure / teensy-nes-gamepad.c
Last active March 21, 2025 20:08
More advanced NES / SNES to USB adapter, using a Teensy 2.0 board. Controller type can now be auto-detected, and there's an option to translate button presses to either USB Joystick or USB Keyboard events.
#include <stdint.h>
// GPIO pins used for connected gamepad
#define CLOCK 21
#define LATCH 20
#define DATA 19
#define DEVICE_TYPE_AUTO 0
#define DEVICE_TYPE_NES 1
#define DEVICE_TYPE_SNES 2