Bringing maker education and computational thinking to the classroom.
Light and Music Show
7 (Could work for 5-8)
180 minutes (approximately 2-3 class periods)
Students design a light and music show that is controlled using the gator:environment sensor, which will measure things such as temperature, humidity, and carbon dioxide. The students begin by using one value collected by the sensor, such as temperature, to control sequences of lights and sound. They then augment their project using multiple values collected by the sensor (i.e. temperature and humidity). Students must use at least two different values. This would work well in a class that has some optional project work at the end. Students will be able to complete simple shows in the 3 class periods for this activity, but there is a lot of room for personalization and continued development for interested groups of students.
micro:bit, gator:bit, gator: environment, environmental sensor, middle school, coding, music, lights
Students should have some experience programming the micro:bit. This project requires more familiarity with variables and if/then/else statements. Ideally, students will have some understanding of these topics through other programming environments or previous MakeCode activities. Students should be comfortable with the rock paper scissors tutorial on the MakeCode website. Additionally students should be comfortable exploring unknown blocks and experimenting to figure out how they work.
Introduction / Motivation:
(Begin by showing at least a couple minutes of the symphony of lights in Hong Kong.) What did you notice about the video? How do you think they are creating something like this? (Get kids excited and thinking about how to create something similar.) Today you get to design your own light and music show.
Make sure you are familiar with the different capabilities of the gator:bit and micro:bit. The main ones to focus on here are the different ways to represent information using the 5 LEDS on the gator:bit controlled by pin P12, the speaker controlled by pin P0, and the 25 LEDs on the micro:bit itself (see Figure 1). In addition, make sure you are familiar with the gator:environment sensor and how to wire it (see Figure 2). There are two blocks for controlling the gator:environment (see Figure 3). The main thing to remember is to connect the ground wire first to prevent any incomplete circuits. Incomplete circuits can cause parts of the system to heat up.
Figure 1: Ways to use the gator:bit/micro:bit to represent information.
Figure 2: Wiring diagram for the gator:environment sensor and picture of an actual set up.
|This block must be run in the on start block to make a little room on the micro:bit for the gator:environment to get the values from the sensor.
|The gator:environment can measure six different things: temperature in Fahrenheit and Celsius, Pressure, Humidity, Carbon Dioxide (CO2) and Total Volatile Organic Compounds. To change which value the gator:environment gives you, click the down arrow in the block sensor.
Figure 3: Control blocks for the gator:environment.
Before the Activity
With the Students
Figure 4: Sequence of moves in MakeCode to add the gator:environment.
Figure 5: Sequence of moves in MakeCode to add the neopixel library