Motion Sensor with 2 step led fade by sparky642

This sketch is missing a short description
<span style="display:block; text-align:center;"><iframe width="300" height="169" src="http://www.youtube.com/embed/1aWGVZqgw-k?feature=oembed" frameborder="0" allowfullscreen></iframe></span>This sketch is to enable a motion sensor controlled single color LED Strip in my closet. The flow will fade the LED strip via PWM up to full when motion is detected, then fade to a dim level after a period of time with no motion. Finally it will turn the LED's off. At any time when motion is detected it will return to full brightness. I am using a N-channel mosfet to control the 12v LED's. This was written to be used on the Adafruit Trinket 5v Feel free to use/share/modify this example. Created by ([email protected])

Embed This Sketch

Use the following HTML code to embed the sketch code above in your blog or website.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/sketch:81602" frameborder="0"></iframe>

Embed The Serial Monitor

You can also embed the Serial Monitor section! Just use this HTML code.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/serialmonitor" frameborder="0"></iframe>