Objectives

As mentioned earlier, coloured objects absorb certain frequencies of light and reflect others. One objective of this activity is to determine the amount of each primary colour of light flashed by NeoPixel #1 and reflected from an object placed over the Circuit Playground Express board’s colour sensor back into the sensor.

When an object is flashed with light containing RGB components, the colour of the reflected light will vary depending on the object’s colour. For example, the reflected light will predominantly be red if the object is red. The reflected light will include red and green components for a yellow object. All three primary colour components – red, green, and blue – will be reflected if the object is white. (https://www.rohm.com/electronics-basics/sensor/color-sensor)

Reflected light for different object colours (https://www.rohm.com/electronics-basics/sensor/color-sensor)

So, the colour of an object is determined based on the ratio of the RGB colour components in the reflected light. The biology teacher could use this activity to illustrate how the human eye perceives colour. Humans see colour when light reflects off an object, enters their eyes, and is processed by their brain, similar to how a light sensor detects and processes reflected light (https://www.allaboutvision.com/eye-care/eye-anatomy/color-vision/).

In computer science, the teacher could ask students to explain digital images, define what a pixel is, describe the RGB colour format, and discuss how RGB relates to digital images.

Physics teachers may encourage their students to investigate the RGB composition of colours by utilising the colour sensor on the Circuit Playground Express board. As previously mentioned, the RGB component levels of an object’s colour can be observed on the Mu editor’s CircuitPython Plotter when the latter is activated. By pressing button B, students can watch the plotter move up or down when they remove and replace objects placed over the Circuit Playground Express board’s colour sensor with different ones or move the colour sensor along a colour bar. Results are shown in the following plot.

Mathematics teachers could also use such a plot to introduce fundamental concepts of functions in mathematics, such as identifying local and global maximum and minimum points, understanding increasing and decreasing behaviour, or exploring concavity and convexity.

Integrating RGB colours into arts education can give students a deeper understanding of colour theory and its application in digital media. Art teachers could discuss the difference between RGB colour mixing (used in digital media) and subtractive colour mixing (used in painting) with their students. They could explain how mixing paints differs from mixing light.