Coder Social home page Coder Social logo

ioridev / precision-fighting-board Goto Github PK

View Code? Open in Web Editor NEW
20.0 4.0 1.0 1.3 MB

Fighting board running at 8000hz

License: MIT License

C++ 16.79% Python 0.82% C 82.39%
fgc xinput xinput-controller gamepad usb-hid fgcos teensy-board teensy40 arduino hacktoberfest

precision-fighting-board's Introduction

board

We all need to use this board in 20XX.
Discussions

Description

This project aims to develop the fastest game controller by utilizing the power of Teensy 4.0. We strive to achieve a polling rate of 8000Hz, delivering unparalleled responsiveness for an immersive gaming experience.

Where to Buy

Booth
Available for purchase on Booth. Buying from this shop directly supports the developers. For international customers, shipping outside of Japan is possible using address forwarding services like Buyee and Tenso.
image

https://iori-giken.booth.pm/

Features

  • High-speed USB communication using Teensy 4.0
  • Targeting an impressive 8000Hz polling rate
  • Precise and instantaneous input response
  • X-input support
  • No waiting time for debounce

Installation

Open the PrecisionFightingBoard.TEENSY40.hex file in Teensyduino 1.53 and write to Teensy 4.0. 

Pin Number Button
0 Up
1 Down
2 Left
3 Right
4 Home
5 Back
6 Start
7 Y
8 X
9 RB
10 LB
11 A
12 B
14 RT
15 LT
18 L3
19 R3
image

Tips

Not good at soldering or making wires?
Some models are equipped with pins from the beginning, so you can skip this complicated process by using this type of wire and wire for Brook.
Teensy 4.0 Pins

image image
image
image

One GND with a pin is missing, so it must be branched with a breadboard or similar. 

Or you can purchase Breakout Board on Amazon.
image
Breakout Board for Teensy 4.0

Setting Up the Development Environment

Install Arduino IDE 1.8.13 and Teensyduino 1.53.

Clone this repository and copy the x-input/ArduinoXinput_Teensy/teensy directory to C:\Program Files (x86)\Arduino\hardware.

Open PrecisionFightingBoard.ino with the Arduino IDE, go to Tools, change the USB Type to XInput, and then upload it to the Teensy 4.0.

Benchmark

Polling rate test results

I caught the continuous X-input button loop in my Python program and confirmed that it was around 0.125 ms.
image
The program used for the test is in Precision-Fighting-Board/x-input/tester and anyone can try it out.

Comparison with PicoBoard

tester/gamepad_response_time_comparison.py
Gamepad 1 is a Precision-Fighting-Board.
Gamepad 2 is a gp2040-ce

image

Comparison with Brook PS4+ Audio Fighting Board

Gamepad 1 is a Precision-Fighting-Board.
Gamepad 2 is a Brook AFB
image

Use with WingmanFGC 

This is a test on a PC, but when used with WingmanFGC.
Gamepad 1 is a Precision-Fighting-Board with WingmanFGC.
Gamepad 2 is a gp2040-ce
image
Good results with input lag of up to 5 ms.   

Contributing

Contributions are welcome! If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your enhancements or bug fixes.
  4. Test thoroughly.
  5. Submit a pull request detailing your changes.

License

This project is licensed under the MIT License. Please see the LICENSE file for more information.

Acknowledgements

We would like to express our gratitude to the developers and contributors of Teency 4.0 for their amazing work and support.

precision-fighting-board's People

Contributors

ioridev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

kamiyu-bidan

precision-fighting-board's Issues

Strange results from x-ipunt polling rate test 

Run x-input/tester.ino and loop through button presses while x-input/tester.py takes data.

The expected value is around 125 µs, but the actual result is thus an alternating output of slow and fast values. 

Time difference: 79.7999997138977 μs
Time difference: 919.7000002861023 μs
Time difference: 95.49999976158142 μs
Time difference: 907.7000000476837 μs
Time difference: 76.59999990463257 μs
Time difference: 922.9000000953674 μs
Time difference: 102.0 μs
Time difference: 896.2999999523163 μs
Time difference: 90.29999995231628 μs
Time difference: 910.0 μs
Time difference: 88.10000014305115 μs
Time difference: 917.6000001430511 μs
Time difference: 83.69999980926514 μs
Time difference: 901.2999999523163 μs
Time difference: 75.70000004768372 μs

I wonder why, is there a problem with TestScript? 

Saving user settings

Change polling rate or input mode and save

Program / Flash Memory
Teensy 4.0 has 2 Mbyte of flash memory intended for storing your code. The flash memory can also store read-only variables and arrays. A portion of the flash memory may be used for file storage using the LittleFS library. The top 64K of this memory is reserved for EEPROM emulation data and the LED blink restore program.
https://www.pjrc.com/store/teensy40.html

Console support?

I am trying to figure out if I should support the console.
Obviously this spec is geared towards PC users, so I don't think we should support consoles.
Also, there is no way to verify that the console is receiving 8000 Hz input.

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.