Mission 3-3: Get Moving! Lesson 3
Get Moving! Lesson 3
Students will move the CodeBot by powering the wheels.
Overview
Mission 3-3 introduces students to moving CodeBot by controlling its wheels. Students learn to import the entire botcore library using a wildcard, enable the motors, and run the wheels at different power levels to move forward and rotate. The lesson includes two robot labs where students measure distance traveled and rotation angles.
π― Mission Goal: Students will move CodeBot forward, rotate it clockwise, and rotate it counterclockwise by powering the wheels with the motors module.
Learning Targets
- I can import everything in the botcore library.
- I can enable the wheels.
- I can move CodeBot forward.
- I can rotate CodeBot clockwise and counterclockwise.
Key Concepts
-
The botcore library contains many functions and objects, not just leds. You can import the entire library using the wildcard
*. - The wheels must be enabled before running. If you forget this line of code, you will not get an error - the wheels just won't turn.
- A positive left wheel and negative right wheel will rotate clockwise. A negative left wheel and positive right wheel will rotate counterclockwise.
Assessment Opportunities
- Mission 3 Lesson 3 Log
- Submit completed program MoveOut
- Mission 3 Obj. 7-8 Review Kahoot!
Success Criteria
- Import the entire botcore library
- Move the CodeBot forward
- Rotate the CodeBot clockwise
- Rotate the CodeBot counterclockwise
Digital Resources
Classroom Materials
- βΈCodeBot
- βΈUSB cable
- βΈ4 AA batteries
- βΈMeasuring stick
Real-World Applications
Extensions & Cross-Curricular
π€
Vocabulary
βΎ
* character; shorthand for "everything."
π
New Python Code
βΎ
* is a wildcard, which means everything)
-50 for backward movement)
π
Standards
βΎ
CSTA Standards β Grades 6β8
- All CodeBots will need batteries for this lesson. The 'bots will be moving around the room. Rechargeable batteries work fine.
- CodeBots will need space to move. Dedicate some floor space in your room for students to test their code.
- For the first robot lab, have tape measures or yardsticks available for measuring the distance a 'bot moves.
- For the second robot lab, have a protractor available for measuring the angle the 'bot turns. A paper protractor is included in the materials, and it doesn't require any cutting to use. Just tape it to the floor.
- Decide what materials you want to use for presenting the lesson. The slides can be projected on a large screen.
- Be familiar with the mission log assignment and the questions they will answer. Prepare the assignment to give through your LMS.
- If you have a word wall, or another form of vocabulary presentation, prepare the new term.
- This lesson covers objectives 7 and 8 in Mission 3. You do not need to use the instructions in CodeSpace if you don't want to. All material is covered in the slides, including CodeTrek and meeting the goals.
- This lesson includes two "robot labs" that aren't in the CodeSpace instructions. They give students a chance to try things out and experiment. The labs prepare students for the next lesson, which is a navigation challenge.
Lesson Outline
Students can write in their log first and then share, or discuss first and then write in their log.
- Question: What are some common programming errors you have made during this mission?
- Question: How can you avoid the errors, or identify them when they are made?
The questions can help students focus on the programming process. Discussing their answers can be beneficial to the students in the class, to normalize mistakes and foster a growth mindset.
Each student will complete a Mission Log. Students could work in pairs through the lesson, or they can work individually. They will need a CodeBot and cable for the lesson. For the robot labs, they will also need a measuring stick (or tape) and a protractor.
The slide gives important information on what to do before writing code that moves CodeBot. Students answer a question in the mission log.
These slides show the code students will use for the first iteration of their program. It covers the same information as the instructions in CodeSpace and can be used as an alternative.
This slide helps students meet the goal for objective 7. The code from CodeTrek is included. Students do not need to unplug CodeBot when they run the code. It is simply going to spin, so it can remain on their desk.
This is an added lab to give students more experience with moving their 'bot, and a chance to try out the new code. For the lab, students will need space on the floor and a way to measure distance. This can be a little tricky the first time. Students must run the code first to load the program on CodeBot. Here is a suggested process - as a teacher, you can model this first:
- Run the code with the cable attached (this loads the program).
- When the code runs, hold the 'bot by its back, avoiding contact with the wheels. The wheels will turn in the air as the program runs.
- Disconnect the 'bot from the cable.
- Set the 'bot on the floor, at a starting line, next to the measuring stick.
- Press the "REBOOT" button. The program will run again, without a cable.
- Measure the distance.
- Return to the computer, make changes to the code, and reconnect the 'bot. Start the process over for each code change.
This is a very short objective. The slide discusses the code to rotate CodeBot.
The robot lab incorporates the goal for the objective, instead of doing it separately. If you are not doing the lab, you can just have students meet the goal. If students do the lab, the first trial meets the goal for the objective, and then they can continue to experiment and try out different combinations of powers and delays. Students will need a protractor to measure angle. You may need to review clockwise and counterclockwise since students may not use a traditional analog clock anymore. A paper protractor is provided in the teacher materials. Help the students know how to orient the protractor. Then measuring the angles should be fairly easy. If a 'bot goes past 180 in either direction, students will need to count past 180, since the protractor will not have those angles marked.
π Optional: Mission 3 Obj 7-8 Kahoot! Review. A review Kahoot! is available for this lesson. You can do the Kahoot together as a class, or assign it independently.
The post-mission reflection asks students to think about and review what they have learned in this lesson.
- You can use an extension or cross-curricular activity as a post-mission activity.
- You can use the Mission 3 Obj. 7-8 Kahoot as a lesson review.
End by collecting the Mission 3 Lesson 3 Log.