Xmas Tree with 15 LEDs

  • How could we connect fifteen leds with the form of a tree to be programmed by using the Arduino program examples "Array " and "Button"?

    It´s quite simple, as you can see in this electronic diagram:

    We need a 100 ohms resistor for each Digital pin of the board and a 10K resistor to connect the button, and the result is something like that:

    Finally the code is an ARRAY of leds which goes diagonally lightning, but if you press the BUTTON, all the leds are ON for three seconds (you can download it here):

    Arrays_XmasTree_plus.txt

    Look at this video to understand better how it works: