In this demonstration we will going to drive the LED on breathing / pulsing effect simply turn the LED on or off while adjusting the brightness.

Required Parts

Arduino UNO/MEGA/NANO/PRO
LED Any cor
220 k Ohms Resistor

Wiring the LED to Arduino

Traffic-Light-with-Arduino4

The Arduino Sketch Code

 

 

Breathing / Pulsating LED with Arduino
Facebooktwitterredditpinterestmail
Tagged on:     

JLCPCBPCBgogoPCBway4pcb

One thought on “Breathing / Pulsating LED with Arduino

  • at
    Permalink

    This code doesn’t compile, it contains an error and an incorrect comment:

    The error:
    – It define LEDPin but then refers to ledPin. Replace one or the other to agree with the other one.
    The Incorrect comment:
    – The “delay(25)” does not pause for two seconds. The parameter to delay() is in milliseconds. it should be delay(2000)

    None of this is really hard to fix but you may want to correct the code.
    Thank you

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *