thanks fernando is work very fine...
-------------------------------- Last edited Tue May 15, 2018 6:19 pm --------------------------------
sorry sir...i need your help
in cloud condition min and max, i need led is pwm min is '"0" and condition max is "255", i try to change this code but, result fail.
void executeRelampago(byte i)
{
myAnalogWrite(pinoLED[i], random(pwm_nuvem[i], 126)); // Pequena oscilação
delay(random(25, 75));
myAnalogWrite(pinoLED[i], random(126, 175)); // Pequena oscilação
delay(random(25, 50));
myAnalogWrite(pinoLED[i], 0); // Luz media ===> 126 change to 0
delay(random(50, 100));
myAnalogWrite(pinoLED[i], 255); // Luz alta
delay(random(100, 200));
myAnalogWrite(pinoLED[i], 0); // Luz media ===> 126 change to 0
delay(random(50, 100));
myAnalogWrite(pinoLED[i], pwm_nuvem[i]); // Luz normal
#ifdef USE_EXTRA_CHANNEL_FOR_LIGHTNING_DURING_NIGHT
if ((relampagoNoturno == true) && (i == EXTRA_CHANNEL_FOR_LIGHTNING))
{
delay(random(50, 100));
myAnalogWrite(pinoLED[i], valorAnterior);
}
#endif
}