Like Arduinos "map" function reScale converts values from different sizes.

Dependents:   jrh52_a3 TBI_FIAT_FEEDFORWARD Ignition accuBlast_display ... more

Usage

#include "mbed.h" 
#include "reScale.h"

 reScale _scale(0,100,0,10); 

int main() 
{
 uint8_t value=_scale.from(50); 
// value is now set to 5

}

Download repository: zip gz

Files at revision 1:ebb951147122

Name Size Actions
[up]
reScale.cpp 322 Revisions Annotate
reScale.h 193 Revisions Annotate