|
Computer Science Home
6th Grade Tech Ed
7th Grade Computer Science
8th Grade Computer Science A
Gmail
Google Drive
Google Classroom
Infinite Campus
Typing.com
(Join Class through Google Classroom)
Schoology
Code.org
Tynker Coding Website
Tynker Resource Page
Tynker Online Support Video Help
Quizlet | Quizlet LIVE
Everfi
Khan Academy
Social Media Tips
Netsmartz
Code HS
Karel the Dog class code: 1251
CSTA Standards
ISTE Standards
|
Things are about to get interactive! In this lesson, students will learn how to make their programs interactive by programming Actors to move, point towards other objects, and turn in response to user input (e.g., key presses or tilt controls).
New Code Blocks
- : Run code attached to this block when you press a specified key.
- : Rotate the Actor to the right (clockwise) by a specified amount.
- : Rotate the Actor to the left (counter-clockwise) by a specified amount.
- : Move the Actor a specified number of units.
- : Point the Actor at the specified degree.
Vocabulary
- Rotate: To turn
- Degrees: A unit of measurement used to describe the size of angles
Objectives
Students will...
- Use keyboard (for web) or tilt controls (for mobile) to turn, point, and move Actors
- Create unique controls to guide Actors
- Students complete all Input Events modules on their own:
1. Here Comes the Robot! (Video)
- Students will watch a short video where Ada introduces her new robot, but she needs your students’ help to create a program that moves the robot around the Stage.
2. Learning About Moving Actors (Video)
- This module introduces three coding concepts:
- "Point towards" block- This block makes an Actor face something, usually the mouse-pointer (for web) or touch location (for mobile).
- "Point in direction" block- Remind students that there are 360 degrees in a circle. This blocks points an Actor in any of those 360 directions. Note: Module 4 allows students to explore the concept of degrees further.
- "Turn" block- Students are reminded about the directions clockwise (right) and counter-clockwise (left) that an Actor can turn. Emphasize that the arrow symbols on the blocks indicate which direction it is turning.
3. Robot Movement Example (Example)
- This module is an example of a project where students will need to steer the robot left and right.
- Are web users struggling to steer the robot? Tell students to continually click or hold down the arrow keys to make the robot move.
- Tell students to tap (for mobile) or click (for web) the red button to move on to the next module.
4. Robot Movement (DIY)
- In this DIY project, students will program a green robot to move around the Stage and navigate using input events. Students are also asked to give the robot the number of degrees to rotate.
- Students will follow step-by-step directions to learn how to program the robot to turn clockwise or counter-clockwise.
- Are students struggling with the two directions? Give a hint: Tell them to look at the arrows on the code block.
- Students will need to set the number of degrees by clicking (for web) and dragging (for mobile) the hand in the diagram.
- On web, students will use the arrow keys to move the robot. On mobile, students will use the tilt sensor to move the robot.
5. Robot Maze Example (Example)
- This module is an example of project where students will need to guide the robot through the maze.
- Students will create their own version of this project in the next module.
- Tell students to tap (for mobile) or click (for web) the red button to move on to the next module.
6. Robot Maze (DIY)
- In this DIY project, students will need to finish the program by adding code blocks for the left and right arrow keys (for mobile) or tilting left and tilting right (for mobile).
- On web, students may get confused if they can’t find a code block that says “when [down arrow] key pressed” or “when [left arrow] key pressed.” Point out to them that there is only one of these types of blocks, and it always starts off looking like: “when [up arrow] key pressed.” They can change it to another key.
- On mobile, students may get confused if they can’t find a code block that says “when tilting[left]” or “when tilting [right]”. Point out to them that there is only one of these types of blocks, and it always starts off looking like: “when tilting [left]”. They can change it to another tilt direction.
- Note: This simple maze is similar to a pencil and paper maze--it is not designed to keep Actors from going through walls.
7. Learn How Degrees Work (Video)
- In this module, students will view a presentation that explains degrees in a circle and understand how to use degrees with Tynker Actors.
- Encourage students to explore degree concepts by moving the arrow around the circle.
8. Speed up the Robot Example (Example)
- This module is an example of a project that students will create in the next activity.
- Students will need to make sharp turns with the robot. How well can they adjust its movement?
9. Speed up the Robot (DIY)
- In this DIY project, students will program a robot to move around and make fast turns. Students will also need to specify how many degrees the robot needs to rotate.
- Do students want to speed up the robot? Give a hint: Tell students to increase the number in the “move pixels” block. How fast can they make the robot move and turn?
10. Avoid the Obstacles (Puzzle)
- To solve this puzzle module, students will need to program the car to move towards the green orb without touching any obstacles.
- Remind students to change the parameter inside the “when pressed” code block.
11. Make a Bird Fly Example (Example)
- Students will view a short animated project and make the bird fly around the Stage using arrow keys (for web) or tilt (for mobile).
12. Make a Bird Fly (DIY)
- In this DIY project, students will program a bird to fly around the Stage.
- Note that students are not using costume changes to move the bird. Instead, they are using the new code blocks they’ve learned in this lesson.
- Students will need to specify keyboard keys (for web) or tilt controls (for mobile) in order to control the bird.
- Did students finish early? Encourage them to change the background and draw a more realistic bird!
13. Wrap-Up (Video)
- Students will watch a short video where Ada discovers her robot isn’t working properly. Could this be the work of Dr. Glitch?
14. Quiz (Multiple-Choice)
U.S. Standards
- K-12 CTSA Computer Science Standards (Revised 2017)
Computer Science Teachers Association:
- 1B-AP-10
- 1B-AP-11
- 1B-AP-12
- 1B-AP-15
- 2-AP-12
- 2-AP-13
- 2-AP-15
- 2-AP-16
- 2-AP-17
CCSS-Math: MP.1
- CCSS-ELA: RF.5.4.A, 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
- CS CA: 3-5.AP.10, 3-5.AP.12, 3-5.AP.13, 3-5.AP.14, 3-5.AP.17, 6-8.AP.12, 6-8.AP.13, 6-8.AP.16, 6-8.AP.17
- ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b
|