67 lines
1.2 KiB
Arduino
Raw Normal View History

2021-01-29 12:31:58 +01:00
//
// FILE: Kelvin2RGB_table.ino
// AUTHOR: Rob Tillaart
// PURPOSE: generate table of values
// DATE: 2020-07-29
// URL: https://github.com/RobTillaart/Kelvin2RGB
2021-11-06 15:56:44 +01:00
2021-01-29 12:31:58 +01:00
#include "Kelvin2RGB.h"
Kelvin2RGB KRGB;
2021-11-06 15:56:44 +01:00
2021-01-29 12:31:58 +01:00
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
2023-11-06 14:18:53 +01:00
Serial.print("KELVIN2RGB_LIB_VERSION: ");
Serial.println(KELVIN2RGB_LIB_VERSION);
Serial.println();
2021-01-29 12:31:58 +01:00
KRGB.begin();
test();
}
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()
{
2023-11-06 14:18:53 +01:00
float bright = 100.0; // change to 0.0
2021-01-29 12:31:58 +01:00
while (bright <= 100.0)
{
bright += 5;
for (uint32_t temp = 0; temp < 70000; temp += 200)
{
Serial.print(KRGB.temperature(), 0);
Serial.print("\t");
Serial.print(KRGB.brightness(), 0);
Serial.print("\t");
KRGB.convert_TH(temp, bright);
Serial.print(KRGB.red(), 4);
Serial.print("\t");
Serial.print(KRGB.green(), 4);
Serial.print("\t");
Serial.print(KRGB.blue(), 4);
Serial.print("\t");
KRGB.convert_NB(temp, bright);
Serial.print(KRGB.red(), 4);
Serial.print("\t");
Serial.print(KRGB.green(), 4);
Serial.print("\t");
Serial.print(KRGB.blue(), 4);
Serial.print("\n");
}
}
}
2021-11-06 15:56:44 +01:00
2023-11-06 14:18:53 +01:00
// -- END OF FILE --
2021-12-20 17:09:35 +01:00