Introduction: Rainbow Arrays
When teaching computer science, some of the concepts can be quite strange. One of those concepts is that of an array. Rainbow Arrays is a project that focuses on making this concept very visual. The main features of this lesson will include an understanding of indexing, array sizing, and types. An interface was designed to send an array of colors to a display. The project includes a computer running a Processing UI that sends signals to an Arduino board that changes lights. This project was made in four hours as part of a Hackathon so I hope it inspires you and your students to make more cool stuff!
Step 1: Tools and Supplies
Step 2: The Boxes
- Take the foamcore and LASER Cut it using the design files from Makercase (they are the .dxf files)
- Glue five LEDs to the inside of the your first box (image 2)
- Glue all of the sides on (it should look like the purple box on image 1)
- Repeat this for the other boxes but you will need to cut off the tabs of one side (highlighted in orange on image 3)
- Once you have the number of boxes that you desire (4 if you don't want to code), cut a cover for the boxes out of cardstock and glue them on
- Take a sharpie and number them off (starting at zero for computer science!)
- Lastly, The Lights need to be wired in (image 4). Red wire to the 5v pin, green wire to pin 6, and black wire to GND.
Step 3: The Base
I made a base to give it a cleaner look but this is optional.
- Take your LASER cut pieces and glue everything but the top.
- Cut holes in the top and on one of the sides for wires to poke through.
- Add weight inside (a chance to use some of that old change, image 2)
- Unplug the wiring from the LEDs and poke the connector through.
- Reconnect those wires and place the electronics in the base.
- Take the USB cord and poke it through the box (image 3) and connect it to the Arduino board.
- Glue the boxes to the base's top.
- Glue the top on to the rest of the base sealing everything inside.
Step 4: The Software
It is time to start it up!
- Upload the file labeled "receiverColor.ino" to the Arduino board. If you need help with this click here!
- Install Processing.
- Open the "TransmitterColor.pde" clicking file and then open.
- Click on the Arduino code from earlier.
- Look at the bottom of the window for a "COM#" (this is the USB that the Arduino is connected to).
- This COM# needs to go into the Processing code where all of the ////// are.
- Finally, you can press the play button at the top of the Processing window and have fun using arrays!
Note: Instructables would not let me upload a zip file so If you want to see how they should be organized, click here!