Search

Teaching Computational Thinking: With and Without Technology

Coding equips students with problem-solving, critical thinking, and computational skills that are crucial in today's tech-driven world. It's vital for schools to offer students opportunities to learn computational thinking beyond the scope of traditional computer science classes.

One excellent tool to teach computational thinking is the micro:bit, a small, programmable microcontroller. By incorporating the micro:bit into various subjects like science, mathematics, art, and engineering, educators can create hands-on, interdisciplinary experiences that encourage problem-solving and creativity. I use this approach with high school students at The Possible Zone, a STEAM after-school program in Boston.


Unplugged: Teaching Without Screens

Before jumping into screen-based activities, I find that starting with screen-free, hands-on exercises helps students grasp the key concepts needed for coding. Research shows that kinesthetic learning enhances abstract thinking and problem-solving skills, helping students understand ideas like abstraction and algorithmic thinking without technological distractions. These unplugged activities are especially helpful in environments where technology and internet access may be limited, as they require few resources.

One engaging unplugged activity I use is a modified version of the game Battleship, which helps students learn the coordinate plane while fostering teamwork and strategic thinking. In this version, students use a 5x5 grid and x, y coordinates—similar to how coordinates are used to control the LEDs on a micro:bit.

Activity Breakdown:

Before starting the game, I explain that we’ll be practicing x- and y-coordinates, which are essential for tasks like controlling grids on the micro:bit. I then introduce the x-axis (horizontal) and y-axis (vertical), explaining that their intersection is the origin (0,0). Using coordinates, we can pinpoint specific locations on the grid. For example, "The micro:bit has 25 LEDs, and each LED is controlled by x, y coordinates."

I model the game with a co-teacher or student volunteer and then distribute grids to pairs of students. Teachers circulate to offer help or join in if there is an odd number of students.


Plugged In: Using micro:bit to Teach Coordinates

Integrating coding concepts like conditional statements and variables with a micro:bit and MakeCode offers an engaging way to teach fundamental programming skills. Depending on students' familiarity with these topics, I adjust the level of difficulty. If they are new to coding, we may start with unplugged activities like programming a robot teacher. If they’re already familiar, we dive straight into coding with the micro:bit.

In this activity, students learn to manipulate a sprite's movement on the 5x5 LED grid by creating variables, using conditional statements, and adjusting inputs.

Part 1: Creating a Sprite and Introducing Variables (15 minutes):

We begin with a challenge: move a sprite across the micro:bit’s 5x5 grid without letting it fall off. I introduce "on start" and "forever" blocks in MakeCode. The "on start" block runs code once when the program begins, and the "forever" block runs continuously.

Students then create their sprite using the "plot x, y" block, where the sprite’s position is controlled by the x and y coordinates. I ask them, “What happens when I change the x value? The y value?” This shows them how modifying the x value moves the sprite left or right, and the y value moves it up or down.

We also discuss variables, explaining that they store values that can change. I guide students to create variables like "xCord" and "yCord" to hold the sprite’s coordinates. Then, I introduce conditional statements: these instructions tell the program to act when a condition is true. I guide students to write code to move the sprite to the right when button A is pressed. They "unplot" the sprite, adjust the xCord by 1, and re-plot it in its new position.

Student Challenge: Move the sprite to the left when button B is pressed. This step checks students' understanding.

Part 2: Creating an Invisible Fence (15 minutes):

Next, I ask students what happens when the sprite reaches the grid's edge. It falls off! To prevent this, we use conditional statements to create an “invisible fence.” For example, "If xCord > 4, set xCord to 4" keeps the sprite from going past the right edge of the grid. Students create similar rules to prevent the sprite from going off the left edge.

Part 3: Using Tilt to Move the Sprite (20 minutes):

Students then explore additional inputs, like tilt. I explain that tilting the micro:bit works similarly to tilting a phone to control movement in games. Using the "on tilt right" block, students write code to move the sprite to the right, changing the xCord by 1, and adding a short pause to see the movement. They also use "on tilt down" to move the sprite downward, modifying the yCord by -1.

This series of unplugged and plugged activities creates a practical and fun learning environment, where students practice computational thinking, problem-solving, and collaboration. By integrating math and coding, students reinforce their understanding of key concepts while developing critical thinking skills that apply both inside and outside the classroom.