Git Product home page Git Product logo

rtas's Introduction

Rapid Trigger Arduino Script

Script for using rapid trigger on 2 button keypad. Can be expanded to any number of buttons, depends on your arduino.
There are no strong mathematical ideas behind the code, but it works for me. Feel free to modify it to suit your needs.

Guide

You can simply build one by following this guide.
The code presented in this guide did not work for me, so I made my own version.

Parts I used:

  • Adrduino Pro Micro
  • 2x gateron brown switches (you can buy Lekker L60 & L45 and similar)
  • 4x 1mm magnets (2 in each switch)
  • 2x hall sensors SS49E (you can use more accurate sensors, but I have not tried)
  • 3D printed case and keycaps

Code

Versions:
v4 - deprecated old (This version is easier to understand how the script works. yep, this is dogwater code)
v5 - simplified new.
v6 - v5 with exponential moving average
Depending on the keypad, version 6 can either help or make things worse. Also included is a "test" sketch for testing values ​​for manual tuning.

Constants that should be specified

Variable Meaning
pins Pins on your arduino
keyCodes Keycodes on kb (direct relationship with pins array pins[i] => keyCodes[i])
pinMax Maximum pin values, needed only at startup (does not affect the work in any way)
activatePoints Points below which the press is counted
releasePoints Points of unconditional release
pressDelay Minimal delay between taps
alpha Smoothing factor for EMA (only in v6) must be 0<alpha<1

rtas's People

Contributors

etherlias avatar

Watchers

 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.