diff --git a/src/LightingChecker.cpp b/src/LightingChecker.cpp new file mode 100644 index 0000000..01ec405 --- /dev/null +++ b/src/LightingChecker.cpp @@ -0,0 +1,48 @@ +#include + +#define RED_PIN 1 +#define GREEN_PIN 2 +#define BLUE_PIN 3 + +enum colorTypes { + purple, + blue, + green, + yellow, + orange, + red, + white +}; + +int valueNM; + +colorTypes color = white; + +void readPreferableLight() { + //preferableLight = Read from database +} + +void getColorBasedOnPreferableLight() { + if (valueNM <= 420) { + color = purple; + } + else if (valueNM <= 490) { + color = blue; + } + else if (valueNM <= 575) { + color = green; + } + else if (valueNM <= 585) { + color = yellow; + } + else if (valueNM <= 650) { + color = orange; + } + else if (valueNM <= 750) { + color = red; + } +} + +void activateLight(int duration) { + +} \ No newline at end of file