“digitalWrite (LaserPin, HIGH)” and “digitalWrite (LaserPin, LOW)” indicates when the input voltage is high or low, which light up or fade out the Laser Diode respectively. The expected outcome should be:

 

  1. The Laser Diode light up for 1 second.
  2. The Laser Diode fade out for 1 second.
  3. Repeat the 2 steps above until stop supplying the voltage into Laser Diode Module.