Holiday Lights

Light patterns with Arduino!

In this activity, you will create different patterns of colors using the power of Arduino. This Christmas tree has 16 strands of light, each with 8 special LEDs called "NeoPixels." Sounds like fun? Let's get started!

Ask Ms. Koo or Mrs. Marshall for a Chromebook to begin!

Setup!

  1. Sign into your Chromebook with the following email:
  2. Go to this website: www.codebender.cc/user/gkoo
  3. Click Log In at the top right corner, then click the red "Sign In with Google" button
  4. Click on the "HolidayTree" project
  5. Click on "Clone and Edit" towards the right side of the screen.
  6. Click the green "Clone Sketch & libraries" button

Coding!

  1. Underneath the block of code called "setup()" we are going to create your own function. This is where you are going to write all your code!

    Make sure your cursor is all the way past the final curly bracket (}) before typing:
    void NAME(){
    // code below this line


    // code above this line
    }

    Replace NAME with your first name and last initial (same as what we used earlier).
  2. Before we start coding, we have to tell the Arduino to run your function. Add a call to the function INSIDE the "setup()" block by adding: AFTER tree.init(10); but before the final curly bracket (}).

API

API stands for "Application Program Interface." APIs explain what a piece of code can do and how you can use it to make your own programs.

Class: Holiday Tree

Enum: Color