GY-63_MS5611/libraries/GAMMA/examples/gammaTest2/gammaTest2.ino

44 lines
621 B
Arduino
Raw Normal View History

2021-01-29 06:31:58 -05:00
//
2021-11-02 10:15:11 -04:00
// FILE: gammaTest2.ino
2021-01-29 06:31:58 -05:00
// AUTHOR: Rob Tillaart
// PURPOSE: demo setGamma
// Use Arduino Plotter to see the different curves.
2021-11-02 10:15:11 -04:00
2021-01-29 06:31:58 -05:00
#include "gamma.h"
GAMMA gt; // uses default 32 size
2021-11-02 10:15:11 -04:00
2021-01-29 06:31:58 -05:00
void setup()
{
Serial.begin(115200);
2022-07-25 09:25:14 -04:00
Serial.println();
Serial.println(__FILE__);
Serial.print("GAMMA_LIB_VERSION: ");
Serial.println(GAMMA_LIB_VERSION);
2021-11-02 10:15:11 -04:00
gt.begin();
2021-01-29 06:31:58 -05:00
for (int i = 0; i < 256; i++)
{
2021-11-02 10:15:11 -04:00
for (float gamma = 0.1; gamma < 10; gamma *= 2)
2021-01-29 06:31:58 -05:00
{
2021-11-02 10:15:11 -04:00
gt.setGamma(gamma);
2021-01-29 06:31:58 -05:00
Serial.print(gt[i]);
Serial.print('\t');
}
Serial.println();
}
}
void loop()
{
}
2021-11-02 10:15:11 -04:00
2021-01-29 06:31:58 -05:00
// -- END OF FILE --
2021-11-02 10:15:11 -04:00