Git Product home page Git Product logo

pedalmanager's Introduction

PedalManager

Compile Arduino files

Arduino-powered Sim racing pedals manager.

Supported hardware

  • analogRead (0-1023 10-bit)
  • ADS1115 (0-32767 15-bit)
  • HX711 load cell (0-131070 ~17-bit noise-free) (downscaled to 15-bit for HID)

Features

  • EEPROM-saved calibration values.
  • Axis mapping (saturation, deadzone, 6 point adjustment)
  • Linear recursive exponential smoothing filter (adjustable filter level)

Dependancies

How to use

Pedal.h class handles smoothing, mapping, calibration etc, but does not implement HID. This means you can use the class to direct the data elsewhere (maybe wireless, bluetooth etc.)

Each Pedal is initialised with a supported hardware type (ADS, analogRead or HX711), with a reference to each type being used when reading the pedal value. This may change in the future to remove hardware implementation, since there are many other ways of handling pedal data (hall effect sensors, potentiometers, other ADC modules etc) that may use different range, scalings, conversions. All raw pedal data should be provided as a 16-bit number (0-65535) for standardisation with HID axis'.

Methods are available to set calibration data such as deadzone, range, filter, mapping values etc. You may wish to implement a command based serial protocol to handle setup from software (see Simforge_Engineering_Pedals.ino). You can also implement auto-ranging calibration, percentage based deadzones and other features in your implementation.

Command Table

PC Arduino reply Description
"i;v\n" "i;v;1.0.0\r\n" request firmware version
"i;c\n" "i;c;Simforge Engineering\r\n" request company name
"i;o;1\n" "l;1234;4567;7890\r\n" toggle live data (1 = on, 0 = off)
"c;0;a;00000\n" "c;0;a;saved\r\n" set upper deadzone for pedal 0 to 00000
"c;1;b;01234\n" "c;0;a;saved\r\n" set lower deadzone for pedal 1 to 1234
"c;1;c;32767\n" "c;0;a;saved\r\n" set upper range for pedal 1 to 32767
"c;2;d;00000\n" "c;0;a;saved\r\n" set lower range for pedal 2 to 00000
"c;2;f;00030\n" "c;0;f;saved\r\n" set filter value for pedal 2 to 30
"c;0;z\n" "c;0;z;reset\r\n" factory reset calibration values

pedalmanager's People

Contributors

morguux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pedalmanager's Issues

EEPROM Lifespan Enhancements

To save the life of the EEPROM on an Arduino (100,000 write cycles rated), the code must only update the EEPROM values that have changed. This requires checking the currently stored value, the EEPROM value, and only over-writing the value if they differ.

Another idea is to automatically switch the position of the stored EEPROM data (advancing the index of the struct position) once the particular EEPROM cells have gone past their lifetime. This can be achieved either by storing the number of writes to the cells (which would require 3 bytes), or checking when a new value is written to the EEPROM, whether or not the actual value has changed by re-reading the value.

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.