Brain DeCoded with CodeX - Mission 1, Objective 3: Introducing CodeX
Introducing CodeX
Students meet the CodeX hardware, connect it to CodeSpace, and write their first Python program.
Overview
This is the objective where the hardware finally comes out. Students get a look at the CodeX, name its parts, and connect it to a computer with a USB cable. Then they write a short program that displays a series of bitmap images on the CodeX screen with a pause between each one.
Two things carry the whole lesson: careful handling of the device, and careful typing. Punctuation and indenting matter in Python, and this is the first program where students will feel that. When a program won't run, those are the first two things to check.
🎯 Project Goal: Students will write a short Python program that runs on the CodeX.
Learning Targets
- I can name the parts of the CodeX.
- I can connect the CodeX to a computer and CodeSpace.
- I can type code in a program file and run the code.
Key Concepts
- CodeX is a powerful embedded computer with loads of sensors, and input and output capabilities.
- Static electricity can harm the device.
- The CodeX needs to be connected to a computer and CodeSpace using a USB cable.
- When CodeX is connected to the computer, a window will pop up. It can be closed, it is not needed for CodeSpace.
- When typing code, punctuation and indenting are VERY important! If a program won't run, check those two things first.
Assessment Opportunities
- Complete the program first_program.
- Exit ticket: draw a picture of CodeX and label the parts.
Success Criteria
- Complete the CodeTrek steps
- Program runs correctly without errors
Digital Resources
Classroom Materials
- ▸Laptop/computer with Chrome browser
- ▸CodeX
- ▸USB cable
Extensions & Cross-Curricular
🔤
Vocabulary
▾
🐍
New Python Code
▾
sleep() function from the time library.
📐
Standards
▾
Computer Science - Grades 9-12
See Getting Started with CodeSpace for help with the steps below.
- Connect a CodeX and run the first_program code yourself before class so you know what students will see on the screen.
- Have CodeX units and USB cables counted out and ready. Decide now whether students work individually or in pairs.
- Open the pics tool in the Toolbox so you can project the gallery of built-in images for the class.
- If you use Google Classroom, set up the class in CodeSpace ahead of time so students can submit their programs through it.
- Plan how you want to hand out and collect devices, and where students will set them down while typing.
- If you use Google Classroom, you can set up the class in CodeSpace so that students submit their programs through Google Classroom.
- The built-in bitmap images can be found in the pics gallery. Students should click on the pics tool so they can easily see the list of available images from the toolbox.
-
When displaying a built-in bitmap image, the name must start with
pics.in lower case, followed by the name of the image in ALL CAPS. - Static electricity can damage the CodeX. Remind students to handle it by the edges and not to slide it around on carpet or fabric.
- Extensions and cross-curricular projects are included to enhance the concepts in the objective. You can use the extensions to extend students' programming experience.
Lesson Outline
Hold up a CodeX before you hand any out and open with a quick discussion.
- Ask: "What do you think this device can do?"
- Ask: "What parts do you recognize, and what are you not sure about?"
Walk through the parts of the CodeX and how it connects, then show the pics gallery.
- Name the parts of the CodeX and point them out on the device.
- Show the USB cable connection to the computer. A window will pop up when it connects, students can close it, CodeSpace does not need it.
- Open the pics tool in the Toolbox and project the gallery so students can see the images available to them.
pics. is lower case and the image name after it is ALL CAPS. Write one on the board as a model before students start typing.Students work through Objective 3 in CodeSpace and build the first_program file.
- Students connect their CodeX to the computer with the USB cable and close the pop-up window.
- Students follow the CodeTrek steps to type the code into first_program.
- Students run the program and watch four bitmap images display with 3 seconds in between.
- Students debug as needed, then submit the completed program.
Collect devices, then close with the exit ticket.
- Exit ticket: draw a picture of CodeX and label the parts.
- Quick share: what was the first thing you had to fix in your program?