Brain DeCoded with CodeX - Mission 5, Objective 3: Neural Rhythms

Mission 5 · Objective 3 Lesson Plan

Neural Rhythms

Students build a program where neurons take turns firing, then hear and see the rhythm that comes out of neurons inhibiting each other.

⏱ 45-70 min 🎯 Grades 8-12+ 💻 CodeSpace 🎮 CodeX 🔊 Sound 🐍 Python
View Lesson Outline
📋

Overview

Objective 2 was about how fast one signal travels. This objective is about what happens when several neurons coordinate. When neurons take turns firing, and each one holds the others back while it goes, the result is a rhythm, and rhythm is what walking, breathing, and chewing all run on.

Students build neural_rhythms, which puts that rhythm on the CodeX in two ways at once. The display animates neurons passing a signal back and forth, and the speaker plays a beat in time with it. Because action potential speed depends on diameter, the work from Objective 2 is what sets how fast the rhythm runs.

This objective makes noise. Plan for that before you start.

🎯 Project Goal: Students add code to a program that simulates the rhythm of neurons firing signals.

🎯

Learning Targets

  • I can explain how motor neurons create a rhythm.
  • I can list factors that determine the speed of the rhythm.
💡

Key Concepts

  • Coordinated motor neurons take turns firing signals, which creates a rhythm.
  • Action potential speed, influenced by neuron diameter, affects rhythm.
✅

Assessment Opportunities

  • Exit ticket: give an example of an activity that requires coordinated motor neurons that would create a rhythm.
  • Turn in the Activity Guide.
  • Complete the program neural_rhythms.
☑

Success Criteria

  • Complete the CodeTrek steps
  • Program runs correctly without errors
  • Activity Guide is completed
📂

Digital Resources

🧰

Classroom Materials

  • ▸CodeX device and USB cable, one per student
  • ▸Laptop/computer with Chrome browser
  • ▸Optional: headphones, for the CodeX headphone jack below the speaker
🚀

Extensions & Cross-Curricular

ExtensionFor students with programming experience, have them read through the code and predict what it will do before running it, then check whether they were right.
ExtensionStudents make adjustments to the code: resize the neuron rectangles, resize or recolor the signal circle, change how many pixels the circle moves each time a signal fires, or adjust the dly variable where it changes inside drum_beat().
Perf ArtsDiscuss or research rhythm in music and performance. Create different rhythms and talk about the mood each one conveys, and how a rhythm might affect the body or muscle movement.
Visual ArtsStudents create an art project that shows a rhythm.
Social StudiesStudents research music in a specific region. What instruments are used, and how is rhythm incorporated? Study it historically or culturally, including the impact of music on that society.
🔤

Vocabulary

▾
Rhythm generator circuit - Neurons that take turns sending signals by inhibiting each other, creating a rhythm.
🐍

New Python Code

▾
from soundlib import *Access the audio functions from the soundlib library.
drum = soundmaker.get_tone('flute')Set up an object to produce a sound. In this example, the sound is "flute."
drum.set_pitch(700)Set the tone, or pitch, of the sound object.
📐

Standards

▾

Computer Science

9-12.AP.13
📝
Preparing for the Lesson
  • Decide your sound plan before class. Thirty CodeX speakers playing a beat at once is a lot, so know whether you are letting the room run loud, asking for headphones, or working in shifts.
  • Run the program yourself first. Knowing what the finished rhythm sounds like and looks like on the display makes it obvious when a student's version is off.
  • Decide how students get the Activity Guide. You can print a copy for each student or assign it digitally. They record results in it, so hand it out before they start.
  • Have a rhythm example ready for the warm-up. Walking, breathing, and chewing all work, and students give better exit tickets after hearing one modeled.
  • If you plan to offer the code adjustment extension, look at where dly changes inside drum_beat() ahead of time so you can point students at it quickly.

🧑‍🏫
Teacher Notes
  • The program uses the built-in CodeX speaker. If the room gets too noisy, you can suggest students use headphones. The CodeX also has a headphone jack just below the speaker.
  • Students should follow the instructions on the Activity Guide and record their results.
  • The display animation and the sound are two views of the same thing. Students who cannot hear the pattern can usually see it, which is useful for anyone working in a quiet corner or with headphones off.
  • Inhibition is the idea worth slowing down on. Neurons create a rhythm by holding each other back, not by speeding each other up, and that is the part students tend to reverse.
  • Extensions and cross-curricular projects are included to enhance the concepts in the objective. You can use the extensions to extend students' learning.
🗺️

Lesson Outline

🗣️Warm-up / Hook

Find the rhythm students are already running on.

  • Ask: "Name something your body does over and over in a steady beat without you thinking about it."
  • Ask: "If your muscles all fired at the same instant instead of taking turns, what would walking look like?"
Teaching tip: Have the class clap a steady beat, then have half the room clap on the offbeat. Taking turns is the whole idea of a rhythm generator circuit, and thirty seconds of clapping teaches it faster than a definition.
🔁Taking Turns

Set up inhibition before students see it in code.

  1. Introduce the rhythm generator circuit: neurons that take turns by inhibiting each other.
  2. Ask two students to model it. One "fires" while holding the other back, then they swap. Repeat until it settles into a beat.
  3. Connect it to Objective 2. Faster action potentials, from wider neurons, mean a faster rhythm.
  4. Hand out or assign the Activity Guide.
Teaching tip: Ask what happens if one neuron stops inhibiting the other. Students usually work out on their own that the rhythm falls apart, which is the point.
💻Student Work Time

Students build neural_rhythms and run the simulation.

  1. Students work through the CodeTrek steps, adding code to neural_rhythms.
  2. They set up the sound with soundmaker.get_tone() and set_pitch(), so the beat plays in time with the animation on the display.
  3. Students run the program, watch the signal move between the neurons, and listen for the beat.
  4. Students record their results on the Activity Guide as they go.
  5. Students who finish early take the adjustment extension: resize the rectangles or the signal circle, change the pixels per step, or change the delay.
Teaching tip: If a student has animation but no sound, check the tone object and pitch before anything else. A missing setup line is far more common than a broken speaker.
🎚Change the Beat

Short investigation to connect speed back to the biology.

  • Have students change the delay and describe what happens to the rhythm.
  • Ask which real factor that delay stands in for, and steer them back to action potential speed and neuron diameter.
  • Ask what kind of movement would need a fast rhythm, and what would need a slow one.
Teaching tip: Let a couple of students play their fastest and slowest rhythms for the room. The contrast makes the point better than a number in a variable does.
✏️Wrap-up & Exit Ticket

Close on coordination.

  • Exit ticket: each student names an activity that needs coordinated motor neurons and would create a rhythm.
  • Read a few out loud and sort them by speed, from slow and steady to fast and repeating.
  • Collect the Activity Guides. Preview Objective 4, which moves from rhythm to reflexes and the central pattern generator.
Teaching tip: Push past "walking" once someone says it. Swimming, drumming, and pedaling all count, and the variety shows students that rhythm is not one special case.