Skip to content

Commit

Permalink
SNES multiplayer interface tested and also working great
Browse files Browse the repository at this point in the history
tests realized with killer instinct on ZSNES (and also Project64, both killers instincts hehe), working great, the same way than with N64 controller: simplest(naïve) implementation

example added, soon on wiki too (N64 is already available!)
  • Loading branch information
marcosassis committed Mar 5, 2018
1 parent b26de1e commit b6fd9e4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/SNES_usb_multiplayer/SNES_usb_multiplayer.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "SNES_gamepad_usb.h"
#include "multiplayer.h"

const uint8_t CLOCK_PIN = 9;
const uint8_t LATCH_PIN = 8;
const uint8_t DATA_PIN1 = 7;
const uint8_t DATA_PIN2 = 6;
// any digital pin will work for this SNES gamepad interface
// tested so far up to 4 gamepads simultaneously

SNES_hid p1(1, DATA_PIN1, CLOCK_PIN, LATCH_PIN);
SNES_hid p2(2, DATA_PIN2, CLOCK_PIN, LATCH_PIN);

gamepad::multiplayer<SNES_hid> multi(p1,p2);

void setup() {}

void loop() {
multi.read();
}

0 comments on commit b6fd9e4

Please sign in to comment.