Color mixing is always a fun activity for kids. Now adding computer coding and electronic engineering into the play, it will be more fun and more challenging. Today we share fun coding activities for kids to learn about colors and light. For kids who had some experience with coding and electrics, I highly recommend using Arduino and Breadboard. For kids who had no coding experience, I have recommendations for easier programs too.
Learn Color Mixing with Computer Coding Using Arduino
Arduino is a system that includes free software and Arduino board. It can take inputs, such as computer programming and turn it into outputs like turning on a LED light. The Arduino we are using is called Arduino Uno. Besides Arduino, we also need a breadboard. Breadboard is one of the most fundamental pieces when learning how to build circuits. Kids can use it to experiment different ways to connect the circuits while learning how electric works. If you have a child who is interested in the electronics, these are two basic pieces you should have at home. We got them through the package from Creation Crate.
1. Collect the items you need: in addition to breadboard and Arduino.
You will also need LED lights of different colors, resistors, and wires. We received all these materials and activity instructions from Creation Crate. It is a subscription box for kids who like science and engineering, or STEM activities. Each month you receive a package with all the materials you need to perform the task they challenge you to do. It is a lot easier on parents and minimizes the frustrations that may come with the compatibility of different parts. I especially appreciate that you have the right resistor with the right value, as I know if it is not right, the LED won’t light up even if kids connect the circuit correctly. To get the right value you have to do calculations based on parameters of other parts, which is not straight forward to many of us.
2. Connect the electric circuit and get ready for coding.
After everything is connected, it will look like the picture below.
We followed the instruction from Creation Crate. So it is not as hard as I thought. I do encourage those who are not familiar with breadboard and Arduino to take quick free courses. I took the classes on LED lights and Arduino. Both are really helpful for me to understand the fundamentals, such as:
What is breadboard? The structure and function of a breadboard.
What are LED lights? How do LED lights function? How is LED different from a bulb?
What is a resistor? Why do you need a resistor? How to tell the value of the resistor?
The structure of the Arduino, and the basic computer codes for Arduino with example projects, such as making a LED light blink.
Although, with the instructions from Creation Crate, kids can connect parts together by themselves correctly pretty easily, with the knowledge from these two classes, they will be able to fully understand the electrical circuits.
3. Time to write computer codes!
First you need download the free Arduino software IDE onto your computer. You can find the software on Arduino website. Creation Crate offers sample code in the package. It is quite easy to copy the code into your own program. But if your kids want to learn coding, it is essential to understand what the codes are doing, and practice to replicate the codes or program their own codes.
The free Arduino class I mentioned above is a very good one to learn Arduino coding as well. Arduino codes are based on C, a computer language many computer systems are based on, so anything learned in the class will have a broad application.
If you feel the code from Creation Crate is too hard, you can try our code, which is much easier, with easier electric circuit set up. An additional benefit of this code, you can manually enter color value for each of the 3 LEDs to better observe color mixing effect. To download the code and circuit setup illustration, please enter your email below.
4. Debug if it is not working.
After kids finishing coding, it is time to connect Arduino to computer and run the program. It is really rare that the whole thing will work smoothly at the first run. More than likely, something will go wrong. This is the time to debug, which means to check where the problem is and fix the problem. We talked about this in our article 5 Most Crucial Computer Coding Skills You Can Teach at Home. In essence, debug is a very important coding skill. Kids learn through experience. When it is time to debug, don’t jump in to help too soon.
5. Explain color mixing effect with coding and science.
If you use the same code Create Crate used, you will see the color of the lantern (provided by Creation Crate) change smoothly from red to green to blue to purple, … What the code does is to give the 3 LED lights different color codes at different time following a math function (sin). While each LED light color changes, the mixed color from all 3 LED lights will change accordingly.
If you have a child who is interested in coding and electronic engineering, or who is techie and hands on, this is definitely a fun and challenging activity for him/her. If you don’t have any materials I mentioned above, I highly recommend Creation Crate. This is the first box you will receive. You can do month by month, or by 6 months, or 12 months. The cost of all the materials is more than the monthly subscription cost. Additionally you get instructions and support.
Learn Color Mixing with Computer Coding Using Microsoft Office
If using Arduino is too hard to your child, a simple coding activity to learn about coding for color and color mix is to draw and color in any Microsoft office software: Word, Excel or Powerpoint.
You can watch a tutorial on color by coding on Khan Academy. With the visual tutorial, kids can see how the color changes by different color parameters. After watching the tutorial, you can download the free template in Word and play around with your child. To use the template, you just need open it in Word, and move the computer mouse around to click on each shape. You can then go to Format, and fill each shape with different colors. If you click on “More fill colors”, you will open the window where kids can see the RGB numbers. Need more instructions? Come back next week. We will have a post on color coding in pictures to explain more in detail.
For more ideas to help kids learn computer coding, visit 5 Crucial Computer Coding Skills You can Teach Kids at Home, plus a Free Printable Coding Game. You will also like to read Best Coding Learning Tools for Kids, and 11 Activities to Teach Kids Coding without a Computer.