Hi All;
So I have a Moisture Module, a Button, and an LED Strip. I have an event triggered by the button where I read the moisture and want to fill the LED strip accordingly:
float LEDSize = MaxMoisture / 7; //THERE ARE SEVEN LEDS WE COULD LIGHT UP
ledstrip.TurnAllOff();
int iterations = (int)Math.Floor(reading / LEDSize);
for (int i = 0; i < iterations; i++)
{
ledstrip.TurnOn(i);
}
I want to slow down the filling of the LED strip so there’s a half second pause between each LED lighting up, but it seems there’s no System.Threading.Thread.Sleep(), does anyone know how its done in IoT land?