yeah well i didn't make the sketch up there is a output pin to goes to the arduino digital pin and a vcc and a ground pin. all I'm trying to do is get it to come up slowly in PWM and when it's fully up stay on for 10 minutes and go back down in brightly slowly into it gets to 30% in brightness and then shut off or if someone keeps moving or doing something within that 10 minutes it still remains fully o into they leave. i just don't know how to do that. This is what i need help on.