Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds remap function to converters.py #8

Merged
merged 1 commit into from Mar 3, 2020
Merged

Commits on Mar 1, 2020

  1. Adds remap function to converters.py

    maps a int/float within a given range to the value within a new range.
    
    great example is an AVR that uses dB's
    min = -80dB
    max = 10dB
    
    and you want to convert a percentage (0-100) to the dB for that percentage
    
    ```python
    print(remap(46.0, 0.0, 100.0, -80.0, 10.0)
    ```
    the output is
    ```python
    -38.6
    ```
    kdschlosser committed Mar 1, 2020
    Configuration menu
    Copy the full SHA
    1cd155c View commit details
    Browse the repository at this point in the history