Giter Site home page Giter Site logo

sdvx_leonardo's Introduction

sdvx_leonardo

Arduino Leonardo code to make a Sound Voltex Controller

INTRODUCTION

Sound Voltex is a rhythm game created by Konami. Since it is an arcade game, there are no official controllers and no offical way to play at home. Luckily for us, there is a simulator called K-Shoot Mania. Since we would like to recreate the arcade experience, we will need to create a controller to play the game. This project should help you to create a Sound Voltex controller using an Arduino Leonardo. It takes 7 buttons and 2 rotary encoders and maps them to keyboard and mouse inputs. This allows us to play Sound Voltex/K-Shoot with our homebrew controllers.

WIRING

Here's how to correctly hook up the wires. Firstly, each button needs two wires. One should go to a digital pin as listed below, and the other should go to the ground. The encoders should have three wires, two to the digital pins and one to the ground.

Button A -> Digital 4

Button B -> Digital 5

Button C -> Digital 6

Button D -> Ditital 7

Button FX-L -> Digital 8

Button FX-R -> Digital 9

Button Start -> Digital 10

Rotary Encoder 1 -> Digital 0 and Digital 1

Rotary Encoder 2 -> Digital 2 and Digital 3

MAPPING

The buttons are mapped to alphanumeric keys, while the encoders are mapped to mouse inputs. You may want to change your FX key bindings if you primarily use a Japanese keyboard.

Button A : "d"

Button B : "f"

Button C : "j"

Button D : "k"

Button FX-L : "c"

Button FX-R : "m"

Button Start : "1"

Encoder 1 : Mouse Y-Axis

Encoder 2 : Mouse X-Axis

HOW IT WORKS

During intialization, we set the pins for the buttons to output HIGH. Since one wire is hooked to ground, when the button is pushed it should cause the pin to go to ground. If we read the pin at this time, it should read LOW and thus we know that the button is pushed down. Once we know the button is pushed down, we output a keyboard press through the arduino to the apporiate letter. Once the button is released, we can also release the keyboard press.

The encoders will read its location at every cycle. We then determine if this is more or less than previous and move the mouse x/y axis accordingly. We also set a boundary of -128 <= reading <= 127 and reset the value once they go beyond this limit.

SOURCES

http://forum.arduino.cc/index.php/topic,72276.0.html -- Pushbuttons

www.circuitsathome.com/mcu/reading-rotary-encoder-on-arduino -- Encoders; library needed for encoders

sdvx_leonardo's People

Contributors

omgdanieltam avatar chenx97 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.