Skip to content

Instantly share code, notes, and snippets.

View jasonnyland's full-sized avatar

Jason Nyland jasonnyland

  • Sacramento, CA
View GitHub Profile
@jasonnyland
jasonnyland / teensy-nes-gamepad.c
Last active June 24, 2018 23:44 — forked from cleure/teensy-nes-gamepad.c
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