steve43:
adjusting {led1, 10} sets the speed for ramp up and down. i need to be able to adjust ramp up independently from ramp down
you can call the writeSpeed() method before you set the target set point like this:
if(checkMotion())
{
ledSet[1].writeSpeed(50); // Sets the speed of fade to 10ms per increment <<<<<<<<<<<<
ledSet[1].write(255);
Serial.print(F("Set to max brite at "));
Serial.println(millis());
pirTimer = millis();
}
if((millis() - pirTimer > TIMEOUT) && ledSet[1].setPoint() == 255)
{
ledSet[1].writeSpeed(250); // Sets the speed of fade to 250ms per increment<<<<<<<<<<
ledSet[1].write(0);
Serial.println(F("Motion Timer Expired..."));
Serial.print(F("Set to zero at "));
Regarding the lights, yes you can do what you want... think in terms of states:
IDLE = No Motion, No Flow No Lights on
BATH = Motion, No Flow Bath Lights On
Shower = Flow, No Motion Shower and Bath Lights on
Then, develop your sensor to respond based on its three states...