I have IoT project for my thesis, and I am stuck on this kind of problem. This project is reacting to the incidenting light. I have getter for light sensor value[getLightValue()] I have getters and Setters for RGBW color from LED strips(PWM)[getRedValue(), getWhiteValue()...]
So I need to light LED strips depending on data from Light Sensor. So more darker it is in room, light intensity emited from LED Strips will be bigger. More lighter it is in room, the less light intensity is emited from LED Strips.
I have tried to do it with fixed values like
if(getLightValue()<200){
setWhiteValue(200);
}
But it is rather amateur than good looking. Do you have any suggestions for me? Thank you.