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

42 lines
556 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
// DATE: 2020-08-08
// 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);
2021-11-02 10:15:11 -04:00
Serial.println("gammaTest2.ino");
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