turicas / SNES

Arduino library to get state of the buttons of a SNES controller.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SNES for Arduino

Introduction

This simple library just gets buttons' state information from a SNES controller.

The code was based on a function I've created for explaining how a SNES controller works for a talk I (Álvaro Justen) gave at the Latino-american Free/Libre Software Conference - Latinoware, in 2010. There is a blog post about this function (in Portuguese).

SNES controller

Usage

For now, look at the pins' connections below and upload one example from the Arduino IDE. Enjoy!

Pins' Connections

When you call SNES.begin() you need to pass as parameters the pins you connected the clock, strobe and data pins (in this order).

See the pins of the connector in the SNES controller below, connected to whatever digital port you want and enjoy!

SNES connector pinout

Why Not NESpad/SNESpad?

There is a library called NESpad/SNESpad, but it does not work with my controller, so I've searched and found a detailed specification about how the SNES controller sends data to the SNES console and implemented it.

About

Arduino library to get state of the buttons of a SNES controller.


Languages

Language:C++ 70.0%Language:Java 30.0%