Troy,
Try changing the 0's (right before the 180) to 2 for the minimum. If this doesn't fix it, you may need to change the 0's to 82 for the high res. (2 * 40.95, see below)
- Code: Select all
DaylightPWMValue0=ReversePWMSlopeHighRes(cloudstart,cloudstart+cloudduration,DaylightPWMValue0,0,180);
   DaylightPWMValue2=ReversePWMSlopeHighRes(cloudstart,cloudstart+cloudduration,DaylightPWMValue2,0,180);
The maximum of 90% would be addressed in the Strike code. Change all of the 4095 values to 3685. 4095 = 100%, with each percent equaling 40.95.
- Code: Select all
void SlowStrike()
{
  int r = random(100);
  if (r<20) lightningstatus=1;
  else lightningstatus=0;
  if (lightningstatus)
  {
   // Let's separate left and right both.
   if (r<14) {
    DaylightPWMValue0=4095;
    DaylightPWMValue2=4095;
    ActinicPWMValue1=4095;
    ActinicPWMValue3=4095;
   } else if (r<17) {
    DaylightPWMValue0=100;
    DaylightPWMValue2=4095;
    ActinicPWMValue3=4095;
   } else {
    DaylightPWMValue0=4095;
    ActinicPWMValue1=4095;
    DaylightPWMValue2=100;
   }
  }
  else
  {
   DaylightPWMValue0=100;
   DaylightPWMValue2=100;
  }
  delay(1);