Code for arduino that makes fade in/out effect after receiving signal from switch, PIR sensor, etc. Default pinout: Pin 9 - main output. That's where you connect your LEDs. Of course you can change ...
You can fade out and fade in the light of an LED automatically by using Arduino and a simple code that is described below. Even though the Arduino board cannot output variable voltage on its digital ...
using, be sure to use another PWM capable pin. On most Arduino, the PWM pins are identified with a "~" sign, like ~3, ~5, ~6, ~9, ~10 and ~11. This example code is in the public domain.