Libraries
\ SmoothInterpolate
Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.
Name |
SmoothInterpolate |
Examples |
#include <SmoothInterpolate.h>
void setup()
{
Serial.begin(9600);
float arr[2] = { 0.0, 1.0};
SmoothInterpolate< 2 , 21 > smoothInterpolate = arr;
smoothInterpolate.calculate();
float prev = 0;
for (int i=0; i<smoothInterpolate.size(); i++) {
float smoothed = smoothInterpolate[i];
Serial.print("At ");
Serial.print(i);
Serial.print(" value =");
Serial.print(smoothed);
Serial.print("tdelta = ");
Serial.print(smoothed-prev);
prev = smoothed;
}
}
void loop()
{
}
|
Description |
Make it easy to interpolate smoothly from x to y in z steps (between each value). |
Syntax |
SmoothInterpolate < start, steps > name
|
Methods |
|
Parameters |
start |
start values |
steps |
steps between each value |
name |
function name |
|
Returns |
None |
Usage |
Application |
Updated on July 07, 2011 11:11:34pm PDT