53 lines
870 B
Arduino
Raw Normal View History

2021-01-29 12:31:58 +01:00
//
// FILE: Kelvin2RGB_difference.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo - shows difference between 2 convert functions.
// DATE: 2020-07-29
// URL: https://github.com/RobTillaart/Kelvin2RGB
//
// best viewed in plotter.
2021-11-06 15:56:44 +01:00
2021-01-29 12:31:58 +01:00
#include "Kelvin2RGB.h"
Kelvin2RGB KRGB;
Kelvin2RGB KRGB2;
2021-11-06 15:56:44 +01:00
2021-01-29 12:31:58 +01:00
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
KRGB.begin();
KRGB2.begin();
2021-12-20 17:09:35 +01:00
2021-01-29 12:31:58 +01:00
test_difference();
}
2021-11-06 15:56:44 +01:00
2021-01-29 12:31:58 +01:00
void loop()
{
}
2021-11-06 15:56:44 +01:00
2021-01-29 12:31:58 +01:00
void test_difference()
{
float bright = 100.0;
for (uint32_t temp = 0; temp < 70000; temp += 200)
{
KRGB.convert_TH(temp, bright);
KRGB2.convert_NB(temp, bright);
Serial.print(KRGB.blue() - KRGB2.blue());
Serial.print("\t");
Serial.print(KRGB.red() - KRGB2.red());
Serial.print("\t");
Serial.print(KRGB.green() - KRGB2.green());
Serial.print("\n");
}
}
2021-11-06 15:56:44 +01:00
2021-01-29 12:31:58 +01:00
// -- END OF FILE --
2021-11-06 15:56:44 +01:00