Giter Club home page Giter Club logo

n64analogstick's Introduction

N64 Arduino Controller with 100% Analog Stick Sensitivity (Fix)

Author: Mariano L. Acosta

What you need:

  • A Nintendo 64 controller
  • An Arduino UNO
  • A set of 3 cables
  • FreePie Software (Free)
  • An N64 emulator that allows the mouse axis as a control input (i.e w/the NRange Input plugin)
  • Optional: Vjoy and UCR (software)

Intro and Motivation

This project is based on the instructable: https://www.instructables.com/id/Use-an-Arduino-with-an-N64-controller/ by quasse. Originally it uses Processing to read the data sent by the N64 controller in order to control the keyboard and mouse. However, the mouse version of the instructable doesn't work properly with an emulator because the playable character in a game get stuck when the cursor reaches the border of the screen. This is due the Java class 'Robot' used by the script in Processing that moves the cursor to an absolute position instead of using incremental deltas which are necessary for the controller plugin to correctly track the movement of the stick. A quick solution to this problem is to use the digital pad instead, but with this the sensitivity of the analog stick is lost and therefore the movement is not accurate.

The Solution

After an exahustive search on the internet I found this I/O emulator: https://github.com/AndersMalmgren/FreePIE/wiki (FreePie). So what I did was to create a simple script that reads the serial data sent by the Arduino, then unpack it and map it to the keyboard and mouse. I solved the problem of using 'deltas' in the cursor and now the analog stick works great with full sensitivity in Project 64. To use this solution, load the program 'N64_Arduino.ino' into an Arduino Uno, connect the cables to a N64 controller as the intructable says and then run the script 'N64Stick.py' with FreePie and now you are able to use the controller in a emulator with its full capability.

UPDATE: USB Controller

Once you have the controller mapped with the mouse and keyboard using this solution, you can use a virtual joystick emulator so that the PC can read the N64 joystick as an USB device. I'm using Vjoy with UCR (Universal Controller Remapper) and so far I didn't report any issue.

Please Note

You have to modify the COM port in the script to match your board. In my case I used the 'COM 3' port.

n64analogstick's People

Contributors

mlacosta avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.