44 lines
621 B
Arduino
Raw Normal View History

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