Skip to content

Configuring a dance pad to receive inputs from force-sensitive resistors.

Notifications You must be signed in to change notification settings

tjbautista01/itg-fsr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Force Sensitive Resistors for 4-Panel Dance Game Pads

Table of Contents

Introduction

A Force Sensitive Resistor (FSR) is a resistor that changes its resistive value depending on how much pressure is applied to its surface. They can be used to handle controller inputs on a dance game controller such as one for Dance Dance Revolution (DDR), In The Groove (ITG), or Stepmania.

Why use FSRs?

  • Adjustable Sensitivities
    • Unlike contact sensors which are only ON or OFF, we can determine whether a panel is activated by defining a variable actuation threshold on each individual sensor.
  • User Profiles
    • Save thresholds to a personal user profile that can be loaded and applied on the fly.
    • Accommodate a wider range of foot sizes, shapes, body weights, and play styles.
  • Remote Pad Maintenance
    • Set the sensor thresholds through a web app that can be loaded on your phone.
    • There's basically no need to open up the pad and work underneath the panels anymore.
  • Reliability, Consistency
    • Traditional contact sensors wear down and can be different in quality between manufacturers or even within batches.
    • FSRs can combat consistency over time since players can adjust their sensor thresholds as the sensors get continued use.

High-level Design

  • Hardware (Arduino Leonardo)
    • FSRs are connected to a controller with a joystick library to send inputs to the game.

    • Strings can be written to the controller's serial stream as commands to set new sensitivity thresholds, request the current actuation thresholds, or to request the current amount of pressure applied to the sensors.
    • Any data requests are written back by the serial stream and can be read as bytes.
  • Server (flask)
    • Use Python to interact with the controller to read/write from the controller's serial stream.
    • Run a sqlite database to persist per-pad sensitivities and user profiles.
    • Standup API endpoints to interact with the database and the controller.
  • Client (Typescript React)
    • A simple web application gives users an interface for adjusting the controller sensitivity and for loading or saving sensor thresholds on personal profiles.

Installation

Setting up FSRs for gameplay with an app to adjust the sensitivities happens in three parts.

  1. Setup the hardware. Connect FSRs into an Arduino and flash it with code that will handle PC and PSX joystick inputs.
  2. Stand up the server. Create API endpoints for interacting with the Arduino and with a local profile database.
  3. Run the web client. Once the client is running, the web app can be accessed by any device with a browser (phone, tablet, computer) to manage user profiles and sensor thresholds for up to two pads.

Fork-Specifc Info

This fork will be focusing on adding PS1/PS2 functionality, making FSR pads usable for mentioned consoles. PC functionality is same as parent so it will be compatible, but this fork has the addition of being able to assign pins as digital inputs (for when using a board with only a limited number of analog pins and other inputs are needed like a Start button).

Setting thresholds for PSX play can be done with the board plugged both in PSX controller port and USB. For more information regarding setup for PSX play, refer to #1 in Installation.

Credits

  • Thank you teejusb! He contributed what I used as a base for the hardware code. It was super easy understand and extend for my own use. (teejusb/fsr)
  • CrazyRedMachine for the sample PSX controller code using USBemani v3's PSX code
  • progmem for USBemani code and constant support on how to get things working with a PSX cable (wiring diagram to be added later)
  • veroxzik for creating a simple-to-use PSX controller library

About

Configuring a dance pad to receive inputs from force-sensitive resistors.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 56.1%
  • Python 23.8%
  • C++ 14.7%
  • HTML 2.8%
  • CSS 2.6%