mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
53 lines
870 B
C++
53 lines
870 B
C++
//
|
|
// 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.
|
|
|
|
|
|
#include "Kelvin2RGB.h"
|
|
|
|
Kelvin2RGB KRGB;
|
|
Kelvin2RGB KRGB2;
|
|
|
|
|
|
void setup()
|
|
{
|
|
Serial.begin(115200);
|
|
Serial.println(__FILE__);
|
|
|
|
KRGB.begin();
|
|
KRGB2.begin();
|
|
|
|
test_difference();
|
|
}
|
|
|
|
|
|
void loop()
|
|
{
|
|
}
|
|
|
|
|
|
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");
|
|
}
|
|
}
|
|
|
|
|
|
// -- END OF FILE --
|
|
|