Forum Latest news News Clouds and lightnings simulation

Clouds and lightnings simulation


Post Number:#1 Post Mon May 01, 2017 3:33 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 40
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

After some requests I have added code for clouds and lightnings simulation.

The code is available on Github.

Here a video:

Watch on youtube.com


The configuration for this function can be done only via web interface or directly on code.

Suggestions to improve the function are welcome.

Best regards.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#2 Post Fri May 05, 2017 10:42 am
Posts: 69
Topics: 18
Images: 2
Solve rating: 1
Joined: Tue Apr 14, 2015 11:54 pm
Topics: 18
Age: 42
Gender: Male
National Flag:
Indonesia

Post Number:#3 Post Sat May 06, 2017 3:23 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 40
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

The best solution is install an ethernet shield to use other features available in web interface but if you don't want....

Look for this part: https://github.com/FernandoGarcia/Ferdu ... a.ino#L582

Mainly:

boolean desativarNuvemCanal[NUMERO_CANAIS] = {false, false, false, false, false, false};
byte probNuvemRelampago[2] = {100, 99}; // [0]= nuvem, [1] = relâmpago
byte quantDuracaoMinMaxNuvem[4] = {1, 10, 2, 9}; // Quant. mín., quant. máx., duração min., duração máx.
boolean desativarRelampagoCanal[NUMERO_CANAIS] = {true, true, true, true, true, true};
byte duracaoMinMaxRelampago[2] = {1, 5}; // Duração min., duração máx.


Best regards.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#4 Post Fri Jun 02, 2017 2:27 pm
Posts: 69
Topics: 18
Images: 2
Solve rating: 1
Joined: Tue Apr 14, 2015 11:54 pm
Topics: 18
Age: 42
Gender: Male
National Flag:
Indonesia
Hi!

The best solution is install an ethernet shield to use other features available in web interface but if you don't want....

Look for this part: https://github.com/FernandoGarcia/Ferdu ... a.ino#L582

Mainly:

boolean desativarNuvemCanal[NUMERO_CANAIS] = {false, false, false, false, false, false};
byte probNuvemRelampago[2] = {100, 99}; // [0]= nuvem, [1] = relâmpago
byte quantDuracaoMinMaxNuvem[4] = {1, 10, 2, 9}; // Quant. mín., quant. máx., duração min., duração máx.
boolean desativarRelampagoCanal[NUMERO_CANAIS] = {true, true, true, true, true, true};
byte duracaoMinMaxRelampago[2] = {1, 5}; // Duração min., duração máx.


Best regards.


thanks fernando, If i want to try, whether using the "all led testing" feature, this function can work, so I do not have to wait long to see the results.

thanks
diztly wardizt

Post Number:#5 Post Tue May 15, 2018 8:09 am
Posts: 69
Topics: 18
Images: 2
Solve rating: 1
Joined: Tue Apr 14, 2015 11:54 pm
Topics: 18
Age: 42
Gender: Male
National Flag:
Indonesia
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

}





Return to News





Who is online

Users viewing this topic: No registered users and 1 guest