GY-63_MS5611/libraries/Kelvin2RGB/examples/Kelvin2RGB_table/Kelvin2RGB_table.ino

64 lines
1.1 KiB
Arduino
Raw Normal View History

2021-01-29 06:31:58 -05: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 10:56:44 -04:00
2021-01-29 06:31:58 -05:00
#include "Kelvin2RGB.h"
Kelvin2RGB KRGB;
2021-11-06 10:56:44 -04:00
2021-01-29 06:31:58 -05:00
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
KRGB.begin();
test();
}
2021-11-06 10:56:44 -04:00
2021-01-29 06:31:58 -05:00
void loop()
{
}
2021-11-06 10:56:44 -04:00
2021-01-29 06:31:58 -05:00
void test()
{
float bright = 100.0; // change to 0.0
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 10:56:44 -04:00
2021-01-29 06:31:58 -05:00
// -- END OF FILE --
2021-12-20 11:09:35 -05:00